Thank you Oscar. This helps ;-)



Hi Johan.

One solution would be to have an abstract base class for all those concrete 
implementations that contains the "mappedBy" field/property and common logic, 
assuming the possible concrete classes are "limited" and does not have other 
(not-common) descendants.

We've implemented like that many times.

Another option would be an m-n relationship or a 1-n relationship with a join 
table (see on the ISIS Eclipse templates those starting with "isjdc").

HTH,

Oscar

> El 20/11/2014, a las 7:49, [email protected] escribió:
> 
> I have a general object Assessment that I would like to apply to 'targets' of 
> many different Types in the application.
> 
> 
> 
> In order to be as generic as possible I have set the class of the target of 
> the Assessment to 'Object' (private Object target;)
> 
>    Now if I make a collection on an other object that takes Assessments using 
> @Persistent(mappedBy = "target", dependentElement = "true") JDO cannot map to 
> target.
> 
>    
> 
>    Anybody has a suggestion?
> 

         

Reply via email to