Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321768 - Can't insert data into type with @Embedded annotation (ClassCastException)
Summary: Can't insert data into type with @Embedded annotation (ClassCastException)
Status: RESOLVED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Teneo (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 14:11 EDT by Ed Peters CLA
Modified: 2011-02-16 11:44 EST (History)
1 user (show)

See Also:


Attachments
XSD used to reproduce (1.10 KB, application/octet-stream)
2010-08-04 14:11 EDT, Ed Peters CLA
no flags Details
EObject to insert into data store (229 bytes, text/xml)
2010-08-04 14:12 EDT, Ed Peters CLA
no flags Details
Stack trace from Hibernate (3.65 KB, text/plain)
2010-08-04 14:12 EDT, Ed Peters CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Peters CLA 2010-08-04 14:11:13 EDT
Build Identifier: 1.1.2-v201007191154

I have a schema with two types, OuterRecord and InnerRecord.  OuterRecord has a field of type InnerRecord, but I'm using the JPA @Embedded annotation, so the whole thing should be stored in one table.  I can use the attached XSD to create the DataStore, no problem.  But when I go to insert data, I get a ClassCastException from inside Hibernate.  (There is a test case for this in the Appian/Teneo repository on Assembla.)

Reproducible: Always

Steps to Reproduce:
1. create a data store with the attached XSD
2. convert the supplied XML to an EObject
3. try to save the EObject using a Hibernate session
Comment 1 Ed Peters CLA 2010-08-04 14:11:27 EDT
Created attachment 175860 [details]
XSD used to reproduce
Comment 2 Ed Peters CLA 2010-08-04 14:12:07 EDT
Created attachment 175861 [details]
EObject to insert into data store
Comment 3 Ed Peters CLA 2010-08-04 14:12:25 EDT
Created attachment 175862 [details]
Stack trace from Hibernate
Comment 4 Martin Taal CLA 2010-08-18 08:41:50 EDT
Fix available in cvs, will be in the next build
Comment 5 Martin Taal CLA 2010-08-18 10:22:42 EDT
Fix is available in build of today on interim update site:
http://download.eclipse.org/modeling/emf/teneo/updates/1.2.0/interim/