Announcement Announcement Module
Collapse
No announcement yet.
using -entity at add field Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • using -entity at add field

    hey all,

    i am having some problems with adding fields to entities that were created earlier, am trying to use the -entity switch as Ben described it in part2 of his tutorial:

    "Another point to note from the above field commands is we didn't specify which entity we wanted to insert the fields into. Roo automatically determines you probably want to add the fields to Rsvp, as that's the last entity you worked with. You could also specify an "-entity ~.SomeEntity" argument if you wish to be explicit or target the fields at another entity (in which case that entity will become the default for subsequent entity-related commands)."

    i created an entity called Foo, then another one called Bar and tried to add a set of Bars to Foo:
    add field set jpa -element ~.domain.Bar -fieldName bars -entity ~.domain.Foo

    result: Bar has a set called bars. (i was dealing with Bar just before)

    what am i doing wrong?

  • #2
    replying myself

    consulted clinic.roo, should've used -class, it works.

    Comment


    • #3
      Indeed our scripts (clinic.roo, wedding.roo and vote.roo) are a good way to start learning about roo commands.

      But this should not happen if you rely more on tab completion. So instead of typing '-entity' you just type '-' followed by tab.

      -Stefan

      Comment


      • #4
        Stefan,

        nice tip, thanks a lot.

        Attila

        Comment

        Working...
        X