I am trying to use inheritance between two entities and am running into some roo problems.
If I do this:
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.Code:@RooMongoEntity(identifiertype = ObjectId.class) public class EntityA { private String name; } @RooMongoEntity(identifiertype = ObjectId.class) public class EntityB extends EntityA { private String data; }
However, if I remove the @RooMongoEntity from EntityB:
Then Roo deletes the roo aspect files for the EntityB repository, EntityB dataOnDemand, and EntityB IntegrationTest.Code:@RooMongoEntity(identifiertype = ObjectId.class) public class EntityA { private String name; } public class EntityB extends EntityA { private String data; }
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.


Reply With Quote
