Issue Type: Bug Bug
Affects Versions: 4.0-next
Assignee: Unassigned
Attachments: JPAPolymorphicCollectionTest.java, JPAPolymorphicFindTest.java, JPAPolymorphicGetReferenceTest.java
Components: core, datastore
Created: 17/Sep/12 7:11 AM
Description:

OGM does not provide for polymorphism. The underlying problem is that ogm does not persist the subtypes table info. From one of the unit tests (note both Hero and SuperHero have a table=Hero):

08:01:42,770 TRACE ogm.datastore.access:78 - Reading Tuple with key EntityKey{table='Hero', columnNames=[name], columnValues=[Spartacus]} and context Tuple Context {}
08:01:42,770 TRACE ogm.datastore.access:84 - Build Tuple object with key EntityKey{table='Hero', columnNames=[name], columnValues=[Spartacus]} (does not trigger access to the datastore)
08:01:42,777 TRACE ogm.datastore.access:91 - Creating Tuple with key EntityKey{table='Hero', columnNames=[name], columnValues=[Spartacus]} in datastore
08:01:42,782 TRACE ogm.datastore.access:78 - Reading Tuple with key EntityKey{table='Hero', columnNames=[name], columnValues=[Batman]} and context Tuple Context {specialPower}
08:01:42,782 TRACE ogm.datastore.access:84 - Build Tuple object with key EntityKey{table='Hero', columnNames=[name], columnValues=[Batman]} (does not trigger access to the datastore)
08:01:42,783 TRACE ogm.datastore.access:91 - Creating Tuple with key EntityKey{table='Hero', columnNames=[name], columnValues=[Batman]} in datastore

This issue and OGM-230 are the same issue and OGM-230 should likely be merge into this issue. I've added a Collection test and re-added the getReference test as its behavior is also affected and does differ from hibernate-orm.

This is a show-stopper for me.

Environment: All environments
Project: Hibernate OGM
Priority: Blocker Blocker
Reporter: Jonathan Wood
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira