Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365568 - Combining External and Transient results in a NPE
Summary: Combining External and Transient results in a NPE
Status: RESOLVED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Teneo (show other bugs)
Version: 1.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 06:00 EST by Martin Taal CLA
Modified: 2011-12-05 15:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Taal CLA 2011-12-05 06:00:58 EST
See this question on the form:
http://www.eclipse.org/forums/index.php/mv/msg/263238/760792/

When having an external annotation it makes sense to annotate the refered to class as being transient to prevent a table from being created in the database. This results however in a NPE (see the forum post), as the ereference is set to be transient and no one-to-many annotation is generated.
Comment 1 Martin Taal CLA 2011-12-05 15:09:48 EST
In latest build: an eclass can be annotated with @External, in that case no table will be created for the EClass and all ereferences to it are assumed to be external (they will automatically get an External annotation):

http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Association_Mapping#Storing_external_references_.28to_non-persisted_objects.29.2C_customizing_persisting_references