Giter VIP home page Giter VIP logo

Comments (6)

tejainece avatar tejainece commented on June 15, 2024

Different relations between same two models is not supported.

from jaguar_orm.

tejainece avatar tejainece commented on June 15, 2024

Isn't this, a very uncommon scenario?

from jaguar_orm.

jaumard avatar jaumard commented on June 15, 2024

In my previous work we had this a lot, where you can have like

Product: 
 Category masterCategory;
 List<Category> subCategories;

Or something like:

User:
  List<Tag> selfAddedTag
  List<Tag> adminAddedTag

Maybe it's uncommon but might be nice to have at some point, for now I don't know enough the data I'll nice to put in DB to know if I need this but if I need I might work on this :)
Should be only generation problem as both separately are handle correctly

from jaguar_orm.

tejainece avatar tejainece commented on June 15, 2024

Ok.

How do you differentiate if a row belongs to the scalar (masterCategory) or the list (subCategories) when fetching it?

from jaguar_orm.

jaumard avatar jaumard commented on June 15, 2024

OneToOne and OneToMany is not possible (or not easily)
but OneToOne and ManyToMany is "easy" because oneToOne will have the given id inside his table and subCategories will be under the pivot table

from jaguar_orm.

tejainece avatar tejainece commented on June 15, 2024

Ok :)

from jaguar_orm.

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.