Coder Social home page Coder Social logo

Comments (8)

Zmove avatar Zmove commented on July 17, 2024 1

+1 for relation definition throught the UI. The builder plugin is so powerful. I would like to see some options to create an easy to use relation dropdown field between several content types.

from builder-plugin.

FelixINX avatar FelixINX commented on July 17, 2024

In fact, I don't think that there are relation, for now.

from builder-plugin.

alekseybobkov avatar alekseybobkov commented on July 17, 2024

Relations are not supported at the moment - they are not displayed in the autocomplete fields and cannot be generated with the Builder. Please read about limitations in the plugin documentation: http://octobercms.com/plugin/rainlab-builder

Is the idea that we create the model yaml files in builder and then edit the model manually for relations, validation rules, etc

@axomat - that's correct, Builder can only edit YAML files. From the documentation:

Builder is a productivity tool, it doesn't completely replace coding by hand and doesn't include a code editor for editing PHP files (the only exception is the version management interface). Builder never overwrites or deletes plugin PHP files, so you can rest assured knowing that the code you write never gets touched by Builder. However, Builder can create new PHP files, like models and controllers.

Support for relations in the Inspector autocomplete fields is planned.

Thanks!

from builder-plugin.

FelixINX avatar FelixINX commented on July 17, 2024

@alekseybobkov I have a question, how does the "Relation" field works? and

Builder can only edit YAML files

It can't edit PHP? Like migrations, or only it can create them.

from builder-plugin.

alekseybobkov avatar alekseybobkov commented on July 17, 2024

how does the "Relation" field works

Relations can be defined manually in the model class: http://octobercms.com/docs/database/relations#relationship-types. Currently Builder can't detect model relations and display them when you enter a field name in the Inspector (for example, when you're creating a new form control), but we're planning to implement this feature.

It can't edit PHP? Like migrations, or only it can create them.

That's correct. Builder can't edit PHP files (except Migrations). It can only create new PHP files (controllers, models, etc). There are several reasons why we choose this approach. One of them is that our primary focus is the CMS platform. Developing a complex visual development tool that can safely refactor existing PHP code would move our focus away from the main goal.

from builder-plugin.

FelixINX avatar FelixINX commented on July 17, 2024

Thanks for this answer. Really appreciated!

from builder-plugin.

FelixINX avatar FelixINX commented on July 17, 2024

Hello @FlusherDock1 ,

If you want help you should write in english. OctoberCMS members are really busy and most of the times, you can only get support from community members, in english.

Also, your posts are not related to this issue. For what you ask, please go to the October CMS forum, you will get help there.

Thanks

from builder-plugin.

Lucas2993 avatar Lucas2993 commented on July 17, 2024

Hello, is there some way to make a relation between a field (made with the model builder) and other table (and model) that has a many to many relation with?

I've been reading all the comments but is not working to me to solve my problem.

My point is that i want to construct a form into the builder but some of the fields has relations with other tables and models. This causes an error when i try to use it because it says that the fields are no related with any column in the main table.

Thanks in advance!

from builder-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.