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: tck test status
Date Tue, 24 May 2005 21:25:51 GMT
> Below is a summary four test errors that are responsible for 90 out of a
> total of 115 errors when running the tck on jpox/derby.  The fourth one
> listed is a test cleanup problem logged as JIRA JDO-48.  Could the JPOX
> team please take a look at the others?

> test(org.apache.jdo.tck.query.Cast)javax.jdo.JDOUserException: Field
> "org.apache.jdo.tck.pc.company.Employee.reviewedProjects" has been
> defined as "mapped-by" the field
> "org.apache.jdo.tck.pc.company.Project.reviewers" yet this is of an
> incorrect type (java.util.Set). The field that is set as the "mapped-by"
> must be of type "org.apache.jdo.tck.pc.company.Employee"

Well you have a MetaData specification that has a "mapped-by" that points to a 
Set object in the other class. Is this to represent a M-N or 1-N 
relationship ? I see nothing in the JDO 2 spec that defines the metadata for 
M-N relationships. Would be nice if the spec included a definition of what 
implementations are supposed to accept because without it, it is left open to 
interpretation, which is a bad thing.

JPOX requires that any mapped-by field is of the type of the class that it is 
defined in. 

With 1-N :-
class A
{
    Set b;
}
class B
{
    A a;
}
You define the metadata for A field b to have a mapped-by as "a".


With a M-N :-
class A
{
    Set b;
}
class B
{
    Set b;
}
With JPOX currently you don't use mapped-by, and you use <join/> because for a 
M-N you need a join. I see no <join> in the SVN metadata.

HTH
--
Andy
JPOX - Java Persistent Objects

Mime
View raw message