Announcement Announcement Module
Collapse
No announcement yet.
ROO 1.1.3 cannot process the NotNull correctly with reference Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ROO 1.1.3 cannot process the NotNull correctly with reference

    Hi guys,

    I met a problem, the automatically generated controller class cannot process the reference relationship correctly. I can explain it by a simple sample

    Code:
    // Spring Roo 1.1.3.RELEASE [rev 4404ffb] log opened at 2011-05-07 10:23:59
    project --topLevelPackage com.mikeshi.bus
    persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE --applicationId mike-bus
    entity --class ~.domain.Bus 
    field string name --notNull
    entity --class ~.domain.Passenger
    field string name --notNull
    field reference --fieldName bus --type ~.domain.Bus --notNull 
    field set --fieldName passengers --type ~.domain.Passenger --class ~.domain.Bus --cardinality ONE_TO_MANY
    controller all --package ~.controller
    exit
    Then I run
    Code:
     mvn gae:run
    and I created the Bus entity firstly, and then I try to create a Passenger, but when I click the save button, it told me that bus field could not be null. I definitely selected the bus which I created firstly.

    Is that a bug?

    PS: I use the Google Appengine Datastore as my db, and I modified the pom.xml file, updated the version of maven-gae-plugin to 0.8.4 to use the latest version of GAE .
    Last edited by mikeshi; May 6th, 2011, 11:09 PM.

  • #2
    OK, I resolved it by adding
    Code:
    --mappedBy bus
    in the passenger field of entity Bus

    Code:
    field set --fieldName passengers --type ~.domain.Passenger --class ~.domain.Bus --mappedBy bus --cardinality ONE_TO_MANY
    It seems works well now.

    Comment


    • #3
      OMG, it was not fixed yet, when I changed the DB from HYPERSONIC_IN_MEMORY to GOOGLE_APP_ENGINE, it happened again. But without mappedBy parameter, it also happened in HYPERSONIC_IN_MEMORY DB.

      I begin to hate GAE,

      Comment


      • #4
        OK, I downloaded the nightly build 1.1.4, and it is fixed in ROO 1.1.4 SNAPSHOT, thanks you all

        Now I am expecting ROO 1.1.4 Release on Thurday very very much

        Comment


        • #5
          Well well, now, I cannot generate the GWT by 1.1.4 Snapshot, the error message is
          GWT module's gwt.xml file not found; cannot continue
          Please take a look about it. Thanks

          Comment

          Working...
          X