Usage of Inherited Class


Hi, I found a problem in ObjectDB which may be incompatible with EclipseLink and JPA.

The type nodes2 derives from nodes1, the type nodes1 derives from nodes.

Whether the number is random may be not important. The point is adding 10 nodes2 + 10 nodes1 + 10 nodes resulting no nodes1 from ObjectDB. see the attachment.

Why the parents are all type of nodes2?


Institute of Computer Technologies
image/gif iconObjectDB_Inherit.GIF (63.8KB)
Inherited Collections

This is a complicated example - could you please simplify it and emphasis the exact difference that you have found?

Notice that your code uses random numbers to populate the database, so different runs are expected to generate different results.

If you can post a simple but complete program with no random numbers that demonstrates a difference between ObjectDB and EclipseLink / MySQL it could help.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Ok, I remove the tedious codes. After putting 10 nodes2 + 10 nodes1 + 10 nodes, 30 nodes and 20 nodes1 and 10 nodes2 are expected, but the result in the attachment is not. From the picture, all nodes are nodes2.

Institute of Computer Technologies

Post Reply

To post a reply and/or subscribe to update notifications - please login