Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo/Eclipselink] Incorrect Id mappings for subclasses
[Teneo/Eclipselink] Incorrect Id mappings for subclasses [message #557152] Sun, 05 September 2010 12:47 Go to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Hi,

I am having a problem persisting a rather simple EMF model using Teneo with Eclipselink. The ORM that is generated appears correct to me and the database is created without an issue. But when I try to persist entities the generated SQL is trying to discriminate on a non existent primary key.

Is this a bug or have I defined my EMF incorrectly?

I am running Eclipse 3.6, EclipseLink 2.1.0, EMF Teneo EclipseLink 1.1.0 and EMF 2.6

Many thanks,
Joel

Here is the exception using H2
[EL Warning]: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Column ID not found; SQL statement:
UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2) [42122-117]
Error Code: 42122
Call: UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2)
Query: DataModifyQuery(sql="UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = ? WHERE (ID = ?)")

Here is the exception using Derby
[EL Fine]: Connection(1189166715)--UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2)
[EL Fine]: VALUES(1)
[EL Warning]: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Column 'ID' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'ID' is not a column in the target table.
Error Code: 20000
Call: UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2)
Query: DataModifyQuery(sql="UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = ? WHERE (ID = ?)")


I will add the whole of the run's output at the end of this post for context.

The ecore model:
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="recipes"
    nsURI="http:///com.mirthfullife.epicerie/epicerie.ecore" nsPrefix="com.mirthfullife.epicerie">
  <eClassifiers xsi:type="ecore:EClass" name="RecipeCatalogue" eSuperTypes="#//Identifiable">
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
      <details key="documentation" value="This is the receptacle of all recipes. Any system may have one or more RecipeCatalogue objects.&#xA;&#xA;RecipeCatalogue knows about and can report on all the Recipe objects it contains."/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="myRecipes" upperBound="-1"
        eType="#//Recipe" containment="true" eOpposite="#//Recipe/myCatalogue"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
        defaultValueLiteral="Epicerie Recipe Catalogue">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The name of the catalogue."/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="BookKeeper" abstract="true" eSuperTypes="#//Identifiable">
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
      <details key="documentation" value="The BookKeeper class knows about all book keeping type information that it is useful to record for any given Recipe, such as its creation date and its date of last modification.&#xA;&#xA;This information is automatically generated and maintained by the system and reported to the user, if needed, as read only information."/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationDate" lowerBound="1"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The creation date of this object. This is automatically set at object creation time and cannot be modified."/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="modificationDate" lowerBound="1"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The date of last modification of the object. This is automatically set each time the object is edited."/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Recipe" abstract="true" eSuperTypes="#//BookKeeper">
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
      <details key="documentation" value="The base (abstract) class of all recipes that are held in the system. &#xA;Any concrete type of recipe (such as PaperRecipe, WebRecipe etc.) extends this base type.&#xA;&#xA;This class holds all cataloguing information that is needed to retrieve recipes from the system. Its essential attributes are its unique ID, which is created by the system at recipe creation time, and its name, which identify the recipe to the user.&#xA;&#xA;As a BookeKeeper object, Recipe also knows about all bookkeeping attributes, such as creation and modification date, which are automatically maintained by the system.&#xA;&#xA;Recipe objects are contained in one and only one specific RecipeCatalogue, of which they are aware."/>
    </eAnnotations>
    <eOperations name="getSource" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="This method returns the source of this Recipe, which describes whether this is an internal recipe, a recipe held on loose paper, a book recipe etc.&#xA;&#xA;This is an abstract method, implemented by each concerete Recipe subclass. "/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="myCatalogue" lowerBound="1"
        eType="#//RecipeCatalogue" eOpposite="#//RecipeCatalogue/myRecipes"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The name of the recipe. It does not have to be unique, as we allow multiple recipes with the same name."/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="course" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The course represented by this recipe, namely aperitif, petiser, main course, dessert. &#xA;&#xA;This field will eventually be an enum provided by the persistent store and selected by the user, but it is at first modellled as a simple String for simplicity, with the user being able to enter free text in it."/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="meal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The meal this recipe belongs to, namely breakfast, brunch, lunch, snack, dinner. &#xA;&#xA;This field will eventually be an enum provided by the persistent store and selected by the user, but it is at first modellled as a simple String for simplicity, with the user being able to enter free text in it."/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="primaryIngredient" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="The ingredient that primarily characterises this recipe, such as meat, fowl, fish, vegetable etc.&#xA;&#xA;This field will eventually be an enum provided by the persistent store and selected by the user, but it is at first modellled as a simple String for simplicity, with the user being able to enter free text in it."/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="PaperRecipe" eSuperTypes="#//Recipe">
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
      <details key="documentation" value="This is a concrete Recipe that represents a recipe that is currently stored on loose leaf paper in VO's catalogue. &#xA;&#xA;Such a class does not need more information than is already provided by its superclass, as all other details, such as ingredients, preparation, images etc. are contained in its paper representation. As such, objects of this type essentially represent references to the external paper recipes.&#xA;&#xA;PaperRecipe is especially useful during the initial adoption of L'Epicerie, when the user may want to start cataloguing her recipes in order to get some of the benefits of L'Epicerie but without spending too much time entering recipe details. A PaperRecipe may then be converted into a full blown recipe at any later time."/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="WebRecipe" eSuperTypes="#//Recipe">
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
      <details key="documentation" value="This is a concrete Recipe that represents a recipe that is currently stored on an external website. &#xA;&#xA;Such a class does not need more information than is already provided by its superclass, as all other details, such as ingredients, preparation, images etc. are contained in its web representation. As such, objects of this type essentially represent references to the external web recipes.&#xA;&#xA;WebRecipe is especially useful during the initial adoption of L'Epicerie, when the user may want to start cataloguing her recipes in order to get some of the benefits of L'Epicerie but without spending too much time entering recipe details. &#xA;A WebRecipe may then be converted into a full blown recipe at any later time."/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="BookRecipe" eSuperTypes="#//Recipe">
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
      <details key="documentation" value="This is a concrete Recipe that represents a recipe that is currently stored in a cookery book. &#xA;&#xA;Such a class does not need more information than is already provided by its superclass, as all other details, such as ingredients, preparation, images etc. are contained in its book representation. As such, objects of this type essentially represent references to the external book recipes.&#xA;&#xA;BookRecipe is especially useful during the initial adoption of L'Epicerie, when the user may want to start cataloguing her recipes in order to get some of the benefits of L'Epicerie but without spending too much time entering recipe details.&#xA;A BookRecipe may then be converted into a full blown recipe at any later time."/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Identifiable" abstract="true">
    <eAnnotations source="teneo.jpa">
      <details key="value" value="@MappedSuperclass"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Id&#xA;@GeneratedValue"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong">
      <eAnnotations source="teneo.jpa">
        <details key="value" value="@Version"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
</ecore:EPackage>

The orm.xml
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
	version="1.0">
	<persistence-unit-metadata>
		<xml-mapping-metadata-complete />
		<persistence-unit-defaults>
			<access>FIELD</access>
		</persistence-unit-defaults>
	</persistence-unit-metadata>
	<mapped-superclass
		class="com.mirthfullife.epicerie.recipes.impl.IdentifiableImpl">
		<attributes>
			<id name="id">
				<generated-value strategy="AUTO" />
			</id>
			<basic name="eContainerFeatureID">
				<column name="ECONT_FEAT_ID" />
			</basic>
			<version name="version" />
		</attributes>
	</mapped-superclass>
	<entity class="com.mirthfullife.epicerie.recipes.impl.RecipeCatalogueImpl"
		name="RecipeCatalogue">
		<table name="RECIPECATALOGUE" />
		<inheritance strategy="JOINED" />
		<attributes>
			<basic fetch="EAGER" name="name" optional="false" />
			<one-to-many fetch="LAZY" name="myRecipes"
				target-entity="com.mirthfullife.epicerie.recipes.impl.RecipeImpl">
				<join-column insertable="true" name="RECIPE_MYCATALOGUE_ID"
					nullable="true" unique="false" updatable="true" />
				<cascade>
					<cascade-all />
				</cascade>
			</one-to-many>
		</attributes>
	</entity>
	<entity class="com.mirthfullife.epicerie.recipes.impl.BookKeeperImpl"
		name="BookKeeper">
		<table name="BOOKKEEPER" />
		<inheritance strategy="JOINED" />
		<attributes>
			<basic fetch="EAGER" name="creationDate" optional="false">
				<temporal>TIMESTAMP</temporal>
			</basic>
			<basic fetch="EAGER" name="modificationDate" optional="false">
				<temporal>TIMESTAMP</temporal>
			</basic>
		</attributes>
	</entity>
	<entity class="com.mirthfullife.epicerie.recipes.impl.RecipeImpl"
		name="Recipe">
		<table name="RECIPE" />
		<primary-key-join-column name="BOOKKEEPER_ID" />
		<attributes>
			<basic fetch="EAGER" name="name" optional="false" />
			<basic fetch="EAGER" name="course" optional="true" />
			<basic fetch="EAGER" name="meal" optional="true" />
			<basic fetch="EAGER" name="primaryIngredient" optional="true" />
			<many-to-one name="eContainer"
				target-entity="com.mirthfullife.epicerie.recipes.impl.RecipeCatalogueImpl">
				<join-column name="RECIPE_MYCATALOGUE_ID" />
				<cascade>
					<cascade-all />
				</cascade>
			</many-to-one>
		</attributes>
	</entity>
	<entity class="com.mirthfullife.epicerie.recipes.impl.PaperRecipeImpl"
		name="PaperRecipe">
		<table name="PAPERRECIPE" />
		<primary-key-join-column name="RECIPE_ID" />
		<attributes />
	</entity>
	<entity class="com.mirthfullife.epicerie.recipes.impl.WebRecipeImpl"
		name="WebRecipe">
		<table name="WEBRECIPE" />
		<primary-key-join-column name="RECIPE_ID" />
		<attributes />
	</entity>
	<entity class="com.mirthfullife.epicerie.recipes.impl.BookRecipeImpl"
		name="BookRecipe">
		<table name="BOOKRECIPE" />
		<primary-key-join-column name="RECIPE_ID" />
		<attributes />
	</entity>
</entity-mappings>

The whole run
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.IdentifiableImpl] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.BookKeeperImpl] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.RecipeImpl] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.RecipeCatalogueImpl] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.PaperRecipeImpl] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.WebRecipeImpl] is set to [FIELD].
[EL Config]: The access type for the persistent class [class com.mirthfullife.epicerie.recipes.impl.BookRecipeImpl] is set to [FIELD].
[EL Config]: The column name for element [field id] is being defaulted to: ID.
[EL Config]: The column name for element [field version] is being defaulted to: VERSION.
[EL Config]: The discriminator column name for the root inheritance class [class com.mirthfullife.epicerie.recipes.impl.BookKeeperImpl] is being defaulted to: DTYPE.
[EL Config]: The column name for element [field id] is being defaulted to: ID.
[EL Config]: The column name for element [field creationDate] is being defaulted to: CREATIONDATE.
[EL Config]: The column name for element [field modificationDate] is being defaulted to: MODIFICATIONDATE.
[EL Config]: The column name for element [field version] is being defaulted to: VERSION.
[EL Config]: The primary key column name for the inheritance class [class com.mirthfullife.epicerie.recipes.impl.RecipeImpl] is being defaulted to: ID.
[EL Config]: The column name for element [field primaryIngredient] is being defaulted to: PRIMARYINGREDIENT.
[EL Config]: The column name for element [field course] is being defaulted to: COURSE.
[EL Config]: The column name for element [field name] is being defaulted to: NAME.
[EL Config]: The column name for element [field meal] is being defaulted to: MEAL.
[EL Config]: The discriminator column name for the root inheritance class [class com.mirthfullife.epicerie.recipes.impl.RecipeCatalogueImpl] is being defaulted to: DTYPE.
[EL Config]: The column name for element [field id] is being defaulted to: ID.
[EL Config]: The column name for element [field name] is being defaulted to: NAME.
[EL Config]: The column name for element [field version] is being defaulted to: VERSION.
[EL Config]: The primary key column name for the inheritance class [class com.mirthfullife.epicerie.recipes.impl.PaperRecipeImpl] is being defaulted to: ID.
[EL Config]: The primary key column name for the inheritance class [class com.mirthfullife.epicerie.recipes.impl.WebRecipeImpl] is being defaulted to: ID.
[EL Config]: The primary key column name for the inheritance class [class com.mirthfullife.epicerie.recipes.impl.BookRecipeImpl] is being defaulted to: ID.
[EL Config]: The primary key column name for the mapping element [field eContainer] is being defaulted to: ID.
[EL Warning]: Element [field myRecipes] within entity class [class com.mirthfullife.epicerie.recipes.impl.RecipeCatalogueImpl] uses a collection type [class org.eclipse.emf.common.util.EList] when the JPA specification only supports java.util.Collection, java.util.Set, java.util.List, or java.util.Map.  This type is supported with eager loading; using lazy loading with this collection type requires additional configuration and an IndirectContainer implementation that extends [class org.eclipse.emf.common.util.EList] or setting the mapping to use basic indirection and the type to be ValueholderInterface.
[EL Config]: The primary key column name for the mapping element [field myRecipes] is being defaulted to: ID.
[EL Info]: property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdbc.driver should be used instead.
[EL Info]: property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.url should be used instead.
[EL Info]: EclipseLink, version: Eclipse Persistence Services - 2.1.0.v20100614-r7608
[EL Config]: Connection(2134123845)--connecting(DatabaseLogin(
	platform=>H2Platform
	user name=> ""
	datasource URL=> "jdbc:h2:H2/teneo"
))
[EL Config]: Connection(1604399928)--Connected: jdbc:h2:H2/teneo
	User: 
	Database: H2  Version: 1.1.117 (2009-08-09)
	Driver: H2 JDBC Driver  Version: 1.1.117 (2009-08-09)
[EL Config]: Connection(1344918164)--connecting(DatabaseLogin(
	platform=>H2Platform
	user name=> ""
	datasource URL=> "jdbc:h2:H2/teneo"
))
[EL Config]: Connection(1774197673)--Connected: jdbc:h2:H2/teneo
	User: 
	Database: H2  Version: 1.1.117 (2009-08-09)
	Driver: H2 JDBC Driver  Version: 1.1.117 (2009-08-09)
[EL Info]: epicerie login successful
[EL Fine]: Connection(1604399928)--ALTER TABLE RECIPE DROP CONSTRAINT FK_RECIPE_BOOKKEEPER_ID
[EL Fine]: Connection(1604399928)--ALTER TABLE RECIPE DROP CONSTRAINT FK_RECIPE_RECIPE_MYCATALOGUE_ID
[EL Fine]: Connection(1604399928)--ALTER TABLE BOOKRECIPE DROP CONSTRAINT FK_BOOKRECIPE_RECIPE_ID
[EL Fine]: Connection(1604399928)--ALTER TABLE PAPERRECIPE DROP CONSTRAINT FK_PAPERRECIPE_RECIPE_ID
[EL Fine]: Connection(1604399928)--ALTER TABLE WEBRECIPE DROP CONSTRAINT FK_WEBRECIPE_RECIPE_ID
[EL Fine]: Connection(1604399928)--DROP TABLE RECIPE
[EL Fine]: Connection(1604399928)--CREATE TABLE RECIPE (BOOKKEEPER_ID BIGINT NOT NULL, PRIMARYINGREDIENT VARCHAR, COURSE VARCHAR, NAME VARCHAR, MEAL VARCHAR, RECIPE_MYCATALOGUE_ID BIGINT, PRIMARY KEY (BOOKKEEPER_ID))
[EL Fine]: Connection(1604399928)--DROP TABLE BOOKRECIPE
[EL Fine]: Connection(1604399928)--CREATE TABLE BOOKRECIPE (RECIPE_ID BIGINT NOT NULL, PRIMARY KEY (RECIPE_ID))
[EL Fine]: Connection(1604399928)--DROP TABLE PAPERRECIPE
[EL Fine]: Connection(1604399928)--CREATE TABLE PAPERRECIPE (RECIPE_ID BIGINT NOT NULL, PRIMARY KEY (RECIPE_ID))
[EL Fine]: Connection(1604399928)--DROP TABLE BOOKKEEPER
[EL Fine]: Connection(1604399928)--CREATE TABLE BOOKKEEPER (ID BIGINT NOT NULL, DTYPE VARCHAR(31), CREATIONDATE TIMESTAMP, ECONT_FEAT_ID INTEGER, MODIFICATIONDATE TIMESTAMP, VERSION BIGINT, PRIMARY KEY (ID))
[EL Fine]: Connection(1604399928)--DROP TABLE RECIPECATALOGUE
[EL Fine]: Connection(1604399928)--CREATE TABLE RECIPECATALOGUE (ID BIGINT NOT NULL, DTYPE VARCHAR(31), ECONT_FEAT_ID INTEGER, NAME VARCHAR, VERSION BIGINT, PRIMARY KEY (ID))
[EL Fine]: Connection(1604399928)--DROP TABLE WEBRECIPE
[EL Fine]: Connection(1604399928)--CREATE TABLE WEBRECIPE (RECIPE_ID BIGINT NOT NULL, PRIMARY KEY (RECIPE_ID))
[EL Fine]: Connection(1604399928)--ALTER TABLE RECIPE ADD CONSTRAINT FK_RECIPE_BOOKKEEPER_ID FOREIGN KEY (BOOKKEEPER_ID) REFERENCES BOOKKEEPER (ID)
[EL Fine]: Connection(1604399928)--ALTER TABLE RECIPE ADD CONSTRAINT FK_RECIPE_RECIPE_MYCATALOGUE_ID FOREIGN KEY (RECIPE_MYCATALOGUE_ID) REFERENCES RECIPECATALOGUE (ID)
[EL Fine]: Connection(1604399928)--ALTER TABLE BOOKRECIPE ADD CONSTRAINT FK_BOOKRECIPE_RECIPE_ID FOREIGN KEY (RECIPE_ID) REFERENCES BOOKKEEPER (ID)
[EL Fine]: Connection(1604399928)--ALTER TABLE PAPERRECIPE ADD CONSTRAINT FK_PAPERRECIPE_RECIPE_ID FOREIGN KEY (RECIPE_ID) REFERENCES BOOKKEEPER (ID)
[EL Fine]: Connection(1604399928)--ALTER TABLE WEBRECIPE ADD CONSTRAINT FK_WEBRECIPE_RECIPE_ID FOREIGN KEY (RECIPE_ID) REFERENCES BOOKKEEPER (ID)
[EL Fine]: Connection(1604399928)--CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMERIC(38), PRIMARY KEY (SEQ_NAME))
[EL Fine]: SELECT 1
[EL Warning]: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Table SEQUENCE already exists; SQL statement:
CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMERIC(38), PRIMARY KEY (SEQ_NAME)) [42101-117]
Error Code: 42101
Call: CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMERIC(38), PRIMARY KEY (SEQ_NAME))
Query: DataModifyQuery(sql="CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT NUMERIC(38), PRIMARY KEY (SEQ_NAME))")
[EL Fine]: Connection(1604399928)--DELETE FROM SEQUENCE WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: Connection(1604399928)--SELECT * FROM SEQUENCE WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: Connection(1604399928)--INSERT IGNORE INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0)
[EL Fine]: Connection(1604399928)--SELECT ID, DTYPE, ECONT_FEAT_ID, NAME, VERSION FROM RECIPECATALOGUE WHERE ((NAME = epicerie_recipe_catalogue) AND (DTYPE = RecipeCatalogueImpl))
[EL Fine]: Connection(1774197673)--UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 50 WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: Connection(1774197673)--SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO RECIPECATALOGUE (ID, ECONT_FEAT_ID, NAME, VERSION, DTYPE) VALUES (1, 0, epicerie_recipe_catalogue, 1, RecipeCatalogueImpl)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO BOOKKEEPER (ID, CREATIONDATE, ECONT_FEAT_ID, MODIFICATIONDATE, VERSION, DTYPE) VALUES (3, NULL, 4, NULL, 1, BookRecipeImpl)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO RECIPE (PRIMARYINGREDIENT, COURSE, NAME, MEAL, RECIPE_MYCATALOGUE_ID, BOOKKEEPER_ID) VALUES (NULL, NULL, NULL, NULL, 1, 3)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO BOOKRECIPE (RECIPE_ID) VALUES (3)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO BOOKKEEPER (ID, CREATIONDATE, ECONT_FEAT_ID, MODIFICATIONDATE, VERSION, DTYPE) VALUES (4, NULL, 4, NULL, 1, PaperRecipeImpl)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO RECIPE (PRIMARYINGREDIENT, COURSE, NAME, MEAL, RECIPE_MYCATALOGUE_ID, BOOKKEEPER_ID) VALUES (NULL, NULL, NULL, NULL, 1, 4)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO PAPERRECIPE (RECIPE_ID) VALUES (4)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO BOOKKEEPER (ID, CREATIONDATE, ECONT_FEAT_ID, MODIFICATIONDATE, VERSION, DTYPE) VALUES (2, NULL, 4, NULL, 1, WebRecipeImpl)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO RECIPE (PRIMARYINGREDIENT, COURSE, NAME, MEAL, RECIPE_MYCATALOGUE_ID, BOOKKEEPER_ID) VALUES (NULL, NULL, NULL, NULL, 1, 2)
[EL Fine]: Connection(1774197673)--INSERT IGNORE INTO WEBRECIPE (RECIPE_ID) VALUES (2)
[EL Fine]: Connection(1774197673)--UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2)
[EL Fine]: SELECT 1
[EL Warning]: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Column ID not found; SQL statement:
UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2) [42122-117]
Error Code: 42122
Call: UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = 1 WHERE (ID = 2)
Query: DataModifyQuery(sql="UPDATE RECIPE SET RECIPE_MYCATALOGUE_ID = ? WHERE (ID = ?)")

Re: [Teneo/Eclipselink] Incorrect Id mappings for subclasses [message #557476 is a reply to message #557152] Tue, 07 September 2010 14:52 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Hi,

I cross posted this question to the EclipseLink forum because there was no reply here and I really was not sure where the issue was.

It appears from Chris Delahunt's response that the ORM.xml is not being generated properly in this instance. I'd very much appreciation the opinion of the Teneo team.

Many thanks,
Joel
Re: [Teneo/Eclipselink] Incorrect Id mappings for subclasses [message #557596 is a reply to message #557476] Wed, 08 September 2010 08:19 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Joel,
Reading the eclipselink forum it must indeed be a Teneo issue. Can you enter a bugzilla with the testmodel you use? Then
I can reproduce it.

gr. Martin

On 09/07/2010 04:52 PM, Joel Rosi-Schwartz wrote:
> Hi,
>
> I cross posted this question to the
> http://www.eclipse.org/forums/index.php?t=msg&goto=55747 3&S=96065cb21a879a42e2d6fd6bf3c7d309#msg_557473
> because there was no reply here and I really was not sure where the
> issue was.
> It appears from Chris Delahunt's response that the ORM.xml is not being
> generated properly in this instance. I'd very much appreciation the
> opinion of the Teneo team.
>
> Many thanks,
> Joel


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo/Eclipselink] Incorrect Id mappings for subclasses [message #557815 is a reply to message #557596] Thu, 09 September 2010 05:30 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Hi MArtin,

My model and project is simple enough at the moment, but but they utilise Spring to initialise all bundles. I will have to strip this back to a basic test case to reduce complications. I will not be able to do this till Saturday.

Many Thanks,
Joel

Martin taal wrote on Wed, 08 September 2010 09:19
Hi Joel,
Reading the eclipselink forum it must indeed be a Teneo issue. Can you enter a bugzilla with the testmodel you use? Then
I can reproduce it.

gr. Martin


Re: [Teneo/Eclipselink] Incorrect Id mappings for subclasses [message #557852 is a reply to message #557815] Thu, 09 September 2010 08:41 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Joel,
The model would be enough already, so no need for the complete project, from the model I can generate an orm and a small
testcase. Can you also let me know when the error occurs (it seems when updating an object)?

The eclipselink forum thread also contains an ecore model, so you can also just refer to that from the bugzilla, then I
will pick it up from there:
http://www.eclipse.org/forums/index.php?t=msg&goto=55747 3&S=96065cb21a879a42e2d6fd6bf3c7d309#msg_557473

gr. Martin

On 09/09/2010 07:30 AM, Joel Rosi-Schwartz wrote:
> Hi MArtin,
>
> My model and project is simple enough at the moment, but but they
> utilise Spring to initialise all bundles. I will have to strip this back
> to a basic test case to reduce complications. I will not be able to do
> this till Saturday.
>
> Many Thanks,
> Joel
>
> Martin taal wrote on Wed, 08 September 2010 09:19
>> Hi Joel,
>> Reading the eclipselink forum it must indeed be a Teneo issue. Can you
>> enter a bugzilla with the testmodel you use? Then I can reproduce it.
>>
>> gr. Martin
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:EMF.Edit: Override Copy/Paste to preserve bidirectional references
Next Topic:[CDO] A product with no head
Goto Forum:
  


Current Time: Thu Apr 18 23:28:48 GMT 2024

Powered by FUDForum. Page generated in 0.01679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top