Patrick Linskey wrote:
> 
> Ok... the problem is that OpenJPA requires that you run the OpenJPA
> class enhancer over your classes (or run in a container environment such
> as an appserver or Spring, which can do class-load-time processing).
> 
> The other problem is that the error message is really bad, in that it
> doesn't suggest that as a cause, and in that the message stringification
> is deferred, causing the "Article=null" negative-cache misdirection.
> I've changed the error message and toString() logic.
> 
> Meanwhile, I got the following when running the enhancer on your
> classes:
> 
> <0.0.0 fatal user error> org.apache.openjpa.util.MetaDataException:
> "nl.reinders.bm.generated.License.iLicensenr" declares generator name
> "licensenr", but uses the AUTO generation type.  The only valid
> generator names under AUTO are "uuid-hex" and "uuid-string". 
> 
> I changed the @GeneratedValue annotation to specify that it's using the
> 'GenerationType.TABLE' strategy, but then I ran into problems with
> classes that had compound identity but didn't specify an @IdClass.
> 


Ok, the first part I get; actually very logical. 

The generator I follow also, I should alter the RevEng to generate
type=table. Ok. But the compound identity I'm not quite following. If all is
well then I should be generating "*PK.java" classes for tables with more
than one field in the PK and the corresponding @IdClass. Maybe the quick
change to "@Entity extends @Entity" has a bug, now that I think of it, the
@IdClass may refer to a PK class that actually is in the generated package.
Could you elaborate?

-- 
View this message in context: 
http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata-for-the-class-using-alias-tf3561516.html#a10176178
Sent from the open-jpa-dev mailing list archive at Nabble.com.

Reply via email to