Announcement Announcement Module
Collapse
No announcement yet.
associations mapping in GAE Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • associations mapping in GAE

    Hi all
    what mapping is supported with the GAE plugin
    actually GAE does not support manyToOne,ManyToMany or unowned relationship through normal class reference but through GAE key reference
    is this supported in roo 1.1M1 ,is it planned?
    What exactly the type of association and relationship that can be managed by roo/GAE support?

    thanks
    Joe

  • #2
    Joe, relationships aren't supported in the normal sense by GAE DataStore. We're adding some features in the next Roo release to make it easier to work with related entities, although the relationships won't be in the traditional sense (ie Roo will create getters/setters for related items, but the actual property will simply be the identifier of the related item).

    Comment


    • #3
      Hi dear
      as aspectJ is part of ROO, can't we just intercept the collection property getter and replace its logic with a query which get the items from the DB?
      Joe

      Comment


      • #4
        If you added a field for the related type and annotated it accordingly, you could intercept the field get/set joinpoints to retrieve/set the relationship field and the related identifier field. The benefit of this is your getter/setter is very simple and follows the normal pattern, plus any programmatic usage in the same file can directly use the field and not be forced to pass calls via a getter/setter. The downside of this is it's more complex for someone to figure out what's going on, though I don't think it's a major deal.

        Comment

        Working...
        X