Results 1 to 4 of 4

Thread: using -entity at add field

  1. #1
    Join Date
    Jun 2009
    Posts
    9

    Default 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. #2
    Join Date
    Jun 2009
    Posts
    9

    Default replying myself

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

  3. #3
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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

  4. #4
    Join Date
    Jun 2009
    Posts
    9

    Default

    Stefan,

    nice tip, thanks a lot.

    Attila

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •