Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321768

Summary: Can't insert data into type with @Embedded annotation (ClassCastException)
Product: [Modeling] EMF Reporter: Ed Peters <ed.peters>
Component: TeneoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: d.nikita.e
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
XSD used to reproduce
none
EObject to insert into data store
none
Stack trace from Hibernate none

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/