Announcement Announcement Module
Collapse
No announcement yet.
Roo/ MongoDB Entity Inheritance Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo/ MongoDB Entity Inheritance

    I am trying to use inheritance between two entities and am running into some roo problems.

    If I do this:

    Code:
    @RooMongoEntity(identifiertype = ObjectId.class)
    public class EntityA {
      private String name;
    }
    
    @RooMongoEntity(identifiertype = ObjectId.class)
    public class EntityB extends EntityA {
      private String data;
    }
    Then an EntityB instance ends up having 2 id values because both EntityA_Roo_Mongo_Entity.aj and EntityB_Roo_Mongo_Entity.aj provide ids.

    However, if I remove the @RooMongoEntity from EntityB:

    Code:
    @RooMongoEntity(identifiertype = ObjectId.class)
    public class EntityA {
      private String name;
    }
    
    public class EntityB extends EntityA {
      private String data;
    }
    Then Roo deletes the roo aspect files for the EntityB repository, EntityB dataOnDemand, and EntityB IntegrationTest.

    It appears that the only way to get the Roo ITD code for repository, dod, and IntegrationTest is to have EntityB annotated as a @RooMongoEntity, but that ends up causing the duplicate id problem.

    Is there a solution for this, or is this a roo bug?

    Thanks,
    - David.
Working...
X