db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: JDOFatalInternalException using single field identity
Date Mon, 11 Jul 2005 16:44:41 GMT
Hi Michael,

> The test case defines a superclass and a subclass. Both are persistence
> capable and both define define persistent fields. Mistakenly, I assigned
> all column/field mappings to the subclass in the orm metadata. That's
> why the exception is thrown.
> If I move the fields in the superclass to the subclass, then the test
> case succeeds.
>
> I still have a question: Due to the fact that the above use case
> indicates an user error, should JPOX throw a JDOFatalUserException
> instead of a JDOFatalInternalException?

Yes. The end result should have been a JDOFatalUserException for the incorrect 
metadata spec - and JPOX seems to be totally ignoring this situation 
currently, and consequently failing with something else (which is totally 
misleading for the user). I'll look into it.

It is, of course, valid to specify the mappings for the superclass fields in 
the subclass, but they should then be specified as 
"<superclass>.<subclass-field-name>", and the last I looked this was still on

the TODO list for JPOX.


-- 
Andy
Java Persistent Objects - JPOX

Mime
View raw message