Castor and references

I am attampting to write a program which uses many to one references.

I have an object (obj1) which has a primary key(unique).

obj1 also has an unbounded list.

Each element in this unbounded list has a keyRef.

Castor generates the code for it just fine, but when I attampt to load
data from an xml file it says:

 org.xml.sax.SAXParseException: Identity Constraint error:  identity
constraint
"KeyRef@385e3" has a keyref which refers to a key or unique that is out
of scope

I have also tried to create an element that has a reference to obj1 and
its own primary key, it didn't seen to work.



If anyone could send me a working example of a xsd that uses unique or
ket and keyRef which can be properly
generated by Castor and validate internatal references properly it could
be a great help. 

Thanks in advance.

Received on Friday, 1 February 2002 11:19:46 UTC