fwbrasil / activate

Abandoned: Pluggable persistence in Scala
GNU Lesser General Public License v2.1
299 stars 46 forks source link

'Automatic' support for bidirectional relationships #139

Open eoliphan opened 10 years ago

eoliphan commented 10 years ago

When modeling a typical one-to-many relationship (Order-> OrderLine) it is sometimes useful to be able to navigate to the Order when you have and OrderLine. This currently can only be accomplished 'manually':

OrderLine(order:Order,....)

A good example would be Grails GORM support which has a 'belongsTo' statement in it's domain object DSL that serves this function

http://grails.org/doc/latest/guide/GORM.html#manyToOneAndOneToOne