Announcement Announcement Module
No announcement yet.
Issue with @OneToMany and GAE Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with @OneToMany and GAE

    Let me start out by saying I really love Spring Roo/GWT integration. However, Spring Roo 1.1.2 has issues with entity relationships when using the GAE. Assume I created a class called Person that has a one-to-many relationship to PhoneNumber. In my Person class, I add the following line

    private List<PhonNumber> phoneNumbers;

    Roo then autogenerates an AspectJ file called Person_Roo_JavaBean. This file has two issues.

    First, it tries to create a new HashSet without importing java.util.HashSet. Therefore, I get a "HashSet cannot be resolved to a type error".

    Second, in the getter and setter methods for phone numbers, it tries to instantiate a List rather than an ArrayList.

    List<PhoneNumber> phoneNumbers = new List<PhonNumber>

    Obviously this throws an error as well.

    Since these files are managed by Spring Roo, I cannot fix the errors by hand. Am I doing something wrong, or is this just a bug. As a workaround, I simply remove the @RooJavaBean annotation from the Person class, and create my own getters and setters.

  • #2
    Nevermind, I see someone else also reported this issue.