Results 1 to 5 of 5

Thread: ROO 1.1.3 cannot process the NotNull correctly with reference

  1. #1
    Join Date
    May 2011
    Posts
    20

    Question 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 at 11:09 PM.

  2. #2
    Join Date
    May 2011
    Posts
    20

    Default

    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.

  3. #3
    Join Date
    May 2011
    Posts
    20

    Default

    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,

  4. #4
    Join Date
    May 2011
    Posts
    20

    Smile

    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

  5. #5
    Join Date
    May 2011
    Posts
    20

    Question

    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

Tags for this Thread

Posting Permissions

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