Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] parent/child relations are not persisted
[Texo] parent/child relations are not persisted [message #1256506] Tue, 25 February 2014 14:04 Go to next message
peter meyer is currently offline peter meyerFriend
Messages: 13
Registered: September 2012
Junior Member
Hi all,

i am developing a small RCP based process modeling tool with texo.
The business model can be seen in the attached image.
Root Object is ProcessModel.

In ProcessModel processList and processSteps are modeled as containments.
The other links between Process <-> Process, Process <-> FirstProcessStep and Processtep <-> Processtep respectivly relevant child/parent Lists are modeled as references.

However, if i persist a ProcessModel everything works fine for Processes.

Processsteps are also persisted but no child/parent relations between Processsteps are stored in the database.


kind regards
peter
  • Attachment: process.PNG
    (Size: 23.77KB, Downloaded 22 times)
Re: [Texo] parent/child relations are not persisted [message #1256963 is a reply to message #1256506] Wed, 26 February 2014 00:38 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Peter,
Can you check that indeed the child and parent ereferences have unique/different db columns to store the foreign key?
Sometimes different eattributes/ereferences end up in the same column because of name clashes and the behavior you see
can occur.

Can you post the java code of Processstep?

gr. Martin

On 02/25/2014 03:04 PM, peter meyer wrote:
> Hi all,
>
> i am developing a small RCP based process modeling tool with texo.
> The business model can be seen in the attached image.
> Root Object is ProcessModel.
>
> In ProcessModel processList and processSteps are modeled as containments.
> The other links between Process <-> Process, Process <-> FirstProcessStep and Processtep <-> Processtep respectivly relevant child/parent Lists are modeled as references.
>
> However, if i persist a ProcessModel everything works fine for Processes.
>
> Processsteps are also persisted but no child/parent relations between Processsteps are stored in the database.
>
>
> kind regards
> peter
>


--

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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] parent/child relations are not persisted [message #1257254 is a reply to message #1256963] Wed, 26 February 2014 08:11 Go to previous messageGo to next message
peter meyer is currently offline peter meyerFriend
Messages: 13
Registered: September 2012
Junior Member
Hi Martin,

and thank you for your prompt reply.
I checked the child and parent ereferences. I think they are ok, but to be safe i send you the orm.annotationmodel.
Here is the code for ProcessStep:

package de.processtool.processes;

import java.util.ArrayList;
import java.util.List;

/**
 * A representation of the model object '<em><b>ProcessStep</b></em>'. <!--
 * begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
public class ProcessStep extends Numerator {

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	private WorkingsStep firstWorkingStep = null;

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	private List<ProcessStep> childList = new ArrayList<ProcessStep>();

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	private List<ProcessStep> parentList = new ArrayList<ProcessStep>();

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	private List<WorkingsStep> workingStepList = new ArrayList<WorkingsStep>();

	/**
	 * Returns the value of '<em><b>firstWorkingStep</b></em>' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @return the value of '<em><b>firstWorkingStep</b></em>' feature
	 * @generated
	 */
	public WorkingsStep getFirstWorkingStep() {
		return firstWorkingStep;
	}

	/**
	 * Sets the '{@link ProcessStep#getFirstWorkingStep()
	 * <em>firstWorkingStep</em>}' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param newFirstWorkingStep
	 *            the new value of the '
	 *            {@link ProcessStep#getFirstWorkingStep() firstWorkingStep}'
	 *            feature.
	 * @generated
	 */
	public void setFirstWorkingStep(WorkingsStep newFirstWorkingStep) {
		firstWorkingStep = newFirstWorkingStep;
	}

	/**
	 * Returns the value of '<em><b>childList</b></em>' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @return the value of '<em><b>childList</b></em>' feature
	 * @generated
	 */
	public List<ProcessStep> getChildList() {
		return childList;
	}

	/**
	 * Adds to the <em>childList</em> feature.
	 * 
	 * @param childListValue
	 *            the value to add
	 * @return true if the value is added to the collection (it was not yet
	 *         present in the collection), false otherwise
	 * @generated
	 */
	public boolean addToChildList(ProcessStep childListValue) {
		if (!childList.contains(childListValue)) {
			boolean result = childList.add(childListValue);
			return result;
		}
		return false;
	}

	/**
	 * Removes from the <em>childList</em> feature.
	 * 
	 * @param childListValue
	 *            the value to remove
	 * @return true if the value is removed from the collection (it existed in
	 *         the collection before removing), false otherwise
	 * 
	 * @generated
	 */
	public boolean removeFromChildList(ProcessStep childListValue) {
		if (childList.contains(childListValue)) {
			boolean result = childList.remove(childListValue);
			return result;
		}
		return false;
	}

	/**
	 * Clears the <em>childList</em> feature.
	 * 
	 * @generated
	 */
	public void clearChildList() {
		while (!childList.isEmpty()) {
			removeFromChildList(childList.iterator().next());
		}
	}

	/**
	 * Sets the '{@link ProcessStep#getChildList() <em>childList</em>}' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param newChildList
	 *            the new value of the '{@link ProcessStep#getChildList()
	 *            childList}' feature.
	 * @generated
	 */
	public void setChildList(List<ProcessStep> newChildList) {
		childList = newChildList;
	}

	/**
	 * Returns the value of '<em><b>parentList</b></em>' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @return the value of '<em><b>parentList</b></em>' feature
	 * @generated
	 */
	public List<ProcessStep> getParentList() {
		return parentList;
	}

	/**
	 * Adds to the <em>parentList</em> feature.
	 * 
	 * @param parentListValue
	 *            the value to add
	 * @return true if the value is added to the collection (it was not yet
	 *         present in the collection), false otherwise
	 * @generated
	 */
	public boolean addToParentList(ProcessStep parentListValue) {
		if (!parentList.contains(parentListValue)) {
			boolean result = parentList.add(parentListValue);
			return result;
		}
		return false;
	}

	/**
	 * Removes from the <em>parentList</em> feature.
	 * 
	 * @param parentListValue
	 *            the value to remove
	 * @return true if the value is removed from the collection (it existed in
	 *         the collection before removing), false otherwise
	 * 
	 * @generated
	 */
	public boolean removeFromParentList(ProcessStep parentListValue) {
		if (parentList.contains(parentListValue)) {
			boolean result = parentList.remove(parentListValue);
			return result;
		}
		return false;
	}

	/**
	 * Clears the <em>parentList</em> feature.
	 * 
	 * @generated
	 */
	public void clearParentList() {
		while (!parentList.isEmpty()) {
			removeFromParentList(parentList.iterator().next());
		}
	}

	/**
	 * Sets the '{@link ProcessStep#getParentList() <em>parentList</em>}'
	 * feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param newParentList
	 *            the new value of the '{@link ProcessStep#getParentList()
	 *            parentList}' feature.
	 * @generated
	 */
	public void setParentList(List<ProcessStep> newParentList) {
		parentList = newParentList;
	}

	/**
	 * Returns the value of '<em><b>workingStepList</b></em>' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @return the value of '<em><b>workingStepList</b></em>' feature
	 * @generated
	 */
	public List<WorkingsStep> getWorkingStepList() {
		return workingStepList;
	}

	/**
	 * Adds to the <em>WorkingStepList</em> feature.
	 * 
	 * @param workingStepListValue
	 *            the value to add
	 * @return true if the value is added to the collection (it was not yet
	 *         present in the collection), false otherwise
	 * @generated
	 */
	public boolean addToWorkingStepList(WorkingsStep workingStepListValue) {
		if (!workingStepList.contains(workingStepListValue)) {
			boolean result = workingStepList.add(workingStepListValue);
			return result;
		}
		return false;
	}

	/**
	 * Removes from the <em>WorkingStepList</em> feature.
	 * 
	 * @param workingStepListValue
	 *            the value to remove
	 * @return true if the value is removed from the collection (it existed in
	 *         the collection before removing), false otherwise
	 * 
	 * @generated
	 */
	public boolean removeFromWorkingStepList(WorkingsStep workingStepListValue) {
		if (workingStepList.contains(workingStepListValue)) {
			boolean result = workingStepList.remove(workingStepListValue);
			return result;
		}
		return false;
	}

	/**
	 * Clears the <em>WorkingStepList</em> feature.
	 * 
	 * @generated
	 */
	public void clearWorkingStepList() {
		while (!workingStepList.isEmpty()) {
			removeFromWorkingStepList(workingStepList.iterator().next());
		}
	}

	/**
	 * Sets the '{@link ProcessStep#getWorkingStepList()
	 * <em>workingStepList</em>}' feature.
	 * 
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @param newWorkingStepList
	 *            the new value of the '{@link ProcessStep#getWorkingStepList()
	 *            workingStepList}' feature.
	 * @generated
	 */
	public void setWorkingStepList(List<WorkingsStep> newWorkingStepList) {
		workingStepList = newWorkingStepList;
	}

	/**
	 * A toString method which prints the values of all EAttributes of this
	 * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String toString() {
		return "ProcessStep ";
	}
}



orm.annotationmodel:

<?xml version="1.0" encoding="UTF-8"?>
<annotationsmodel:AnnotatedModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:annotationsmodel="http://www.eclipse.org/emf/texo/annotations/model" xmlns:ormannotations="http://www.eclipse.org/emf/texo/orm/ormannotations">
  <annotatedEPackages>
    <ePackage href="platform:/resource/de.processtool/model/processes.ecore#/"/>
    <ePackageAnnotations xsi:type="ormannotations:EPackageORMAnnotation" generateFullDbSchemaNames="false" maximumSqlNameLength="255" lowerCasedNames="false" upperCasedNames="false" enforceUniqueNames="false" useJoinTablesForContainment="false" useJoinTablesForNonContainment="true" generateJavaAnnotations="false" addOrderColumnToListMappings="false" renameSQLReservedNames="false" uniqueEntityNames="true" setDelimitedIdentifierTagInORM="true">
      <inheritance strategy="TABLE_PER_CLASS"/>
    </ePackageAnnotations>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
      <eClass href="platform:/resource/de.processtool/model/processes.ecore#//Station"/>
      <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
        <entity class="de.kisters.praesto.texo.processes.Station" name="processes_Station">
          <table name="processes_Station"/>
        </entity>
        <inheritance strategy="TABLE_PER_CLASS"/>
      </eClassAnnotations>
    </annotatedEClassifiers>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
      <eClass href="platform:/resource/de.processtool/model/processes.ecore#//Numerator"/>
      <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
        <entity class="de.kisters.praesto.texo.processes.Numerator" name="processes_Numerator"/>
        <mappedSuperclass access="FIELD" class="de.kisters.praesto.texo.processes.Numerator"/>
      </eClassAnnotations>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
        <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Numerator/number"/>
        <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
          <basic name="number" optional="false"/>
        </eAttributeAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
        <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Numerator/name"/>
        <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
          <basic name="name" optional="false"/>
        </eAttributeAnnotations>
      </annotatedEStructuralFeatures>
    </annotatedEClassifiers>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
      <eClass href="platform:/resource/de.processtool/model/processes.ecore#//Process"/>
      <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
        <entity class="de.kisters.praesto.texo.processes.Process" name="processes_Process">
          <table name="processes_Process"/>
        </entity>
        <inheritance strategy="TABLE_PER_CLASS"/>
      </eClassAnnotations>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
        <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Process/childTransition"/>
        <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
          <basic enumerated="STRING" name="childTransition"/>
        </eAttributeAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
        <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Process/parentTransition"/>
        <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
          <basic enumerated="STRING" name="parentTransition"/>
        </eAttributeAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/station"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="station" optional="true">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/childList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToMany name="childList">
            <joinTable name="processes_Process_Child"/>
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/parentList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToMany name="parentList">
            <joinTable name="processes_Process_Parent"/>
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/firstProcessStep"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="firstProcessStep">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/processStepList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToMany name="processStepList">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
    </annotatedEClassifiers>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEEnum">
      <eEnum href="platform:/resource/de.processtool/model/processes.ecore#//Transition"/>
      <eEnumAnnotations xsi:type="ormannotations:EEnumORMAnnotation"/>
      <annotatedEEnumLiterals>
        <eEnumLiteral href="platform:/resource/de.processtool/model/processes.ecore#//Transition/MANUALLY"/>
      </annotatedEEnumLiterals>
      <annotatedEEnumLiterals>
        <eEnumLiteral href="platform:/resource/de.processtool/model/processes.ecore#//Transition/MECHANICALLY"/>
      </annotatedEEnumLiterals>
    </annotatedEClassifiers>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
      <eClass href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep"/>
      <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
        <entity class="de.kisters.praesto.texo.processes.ProcessStep" name="processes_ProcessStep">
          <table name="processes_ProcessStep"/>
        </entity>
        <inheritance strategy="TABLE_PER_CLASS"/>
      </eClassAnnotations>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/firstWorkingStep"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="firstWorkingStep" optional="true">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/workingStepList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <oneToMany name="workingStepList">
            <cascade>
              <cascadeAll/>
            </cascade>
          </oneToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/childList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToMany name="childList">
            <joinTable name="processes_ProcessStep_Child"/>
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/parentList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToMany name="parentList">
            <joinTable name="processes_ProcessStep_Parent"/>
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
    </annotatedEClassifiers>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
      <eClass href="platform:/resource/de.processtool/model/processes.ecore#//WorkingsStep"/>
      <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
        <entity class="de.kisters.praesto.texo.processes.WorkingsStep" name="processes_WorkingsStep">
          <table name="processes_WorkingStep"/>
        </entity>
        <inheritance strategy="TABLE_PER_CLASS"/>
      </eClassAnnotations>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//WorkingsStep/childWorkingStep"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="childWorkingStep" optional="true">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//WorkingsStep/parentWorkingStep"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="parentWorkingStep" optional="true">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
    </annotatedEClassifiers>
    <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
      <eClass href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel"/>
      <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
        <entity class="de.kisters.praesto.texo.processes.ProcessModel" name="processes_ProcessModel"/>
        <inheritance strategy="TABLE_PER_CLASS"/>
      </eClassAnnotations>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
        <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/description"/>
        <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
          <basic name="description"/>
        </eAttributeAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
        <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/name"/>
        <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
          <basic name="name"/>
        </eAttributeAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/processList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <oneToMany name="processList">
            <joinTable catalog="" name="processmodel_to_processes" schema=""/>
            <cascade>
              <cascadeAll/>
            </cascade>
          </oneToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/stationList"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <oneToMany name="stationList">
            <joinTable name="processmodel_to_stations"/>
            <cascade>
              <cascadeAll/>
            </cascade>
          </oneToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/startProcess"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="startProcess">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/endProcess"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <manyToOne name="endProcess">
            <cascade>
              <cascadePersist/>
              <cascadeMerge/>
              <cascadeRefresh/>
            </cascade>
          </manyToOne>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
      <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
        <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/processSteps"/>
        <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
          <oneToMany name="processSteps">
            <cascade>
              <cascadeAll/>
            </cascade>
          </oneToMany>
        </eReferenceAnnotations>
      </annotatedEStructuralFeatures>
    </annotatedEClassifiers>
  </annotatedEPackages>
</annotationsmodel:AnnotatedModel>
Re: [Texo] parent/child relations are not persisted [message #1257819 is a reply to message #1257254] Wed, 26 February 2014 20:40 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Peter,
I didn't see annotations in the java code, so I guess you use a separate orm.xml. Can you post the relevant part of the
orm.xml?

gr. Martin


On 02/26/2014 09:11 AM, peter meyer wrote:
> Hi Martin,
>
> and thank you for your prompt reply.
> I checked the child and parent ereferences. I think they are ok, but to be safe i send you the orm.annotationmodel.
> Here is the code for ProcessStep:
>
>
> package de.processtool.processes;
>
> import java.util.ArrayList;
> import java.util.List;
>
> /**
> * A representation of the model object '<em><b>ProcessStep</b></em>'. <!--
> * begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> public class ProcessStep extends Numerator {
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> private WorkingsStep firstWorkingStep = null;
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> private List<ProcessStep> childList = new ArrayList<ProcessStep>();
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> private List<ProcessStep> parentList = new ArrayList<ProcessStep>();
>
> /**
> * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> private List<WorkingsStep> workingStepList = new ArrayList<WorkingsStep>();
>
> /**
> * Returns the value of '<em><b>firstWorkingStep</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>firstWorkingStep</b></em>' feature
> * @generated
> */
> public WorkingsStep getFirstWorkingStep() {
> return firstWorkingStep;
> }
>
> /**
> * Sets the '{@link ProcessStep#getFirstWorkingStep()
> * <em>firstWorkingStep</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param newFirstWorkingStep
> * the new value of the '
> * {@link ProcessStep#getFirstWorkingStep() firstWorkingStep}'
> * feature.
> * @generated
> */
> public void setFirstWorkingStep(WorkingsStep newFirstWorkingStep) {
> firstWorkingStep = newFirstWorkingStep;
> }
>
> /**
> * Returns the value of '<em><b>childList</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>childList</b></em>' feature
> * @generated
> */
> public List<ProcessStep> getChildList() {
> return childList;
> }
>
> /**
> * Adds to the <em>childList</em> feature.
> * * @param childListValue
> * the value to add
> * @return true if the value is added to the collection (it was not yet
> * present in the collection), false otherwise
> * @generated
> */
> public boolean addToChildList(ProcessStep childListValue) {
> if (!childList.contains(childListValue)) {
> boolean result = childList.add(childListValue);
> return result;
> }
> return false;
> }
>
> /**
> * Removes from the <em>childList</em> feature.
> * * @param childListValue
> * the value to remove
> * @return true if the value is removed from the collection (it existed in
> * the collection before removing), false otherwise
> * * @generated
> */
> public boolean removeFromChildList(ProcessStep childListValue) {
> if (childList.contains(childListValue)) {
> boolean result = childList.remove(childListValue);
> return result;
> }
> return false;
> }
>
> /**
> * Clears the <em>childList</em> feature.
> * * @generated
> */
> public void clearChildList() {
> while (!childList.isEmpty()) {
> removeFromChildList(childList.iterator().next());
> }
> }
>
> /**
> * Sets the '{@link ProcessStep#getChildList() <em>childList</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param newChildList
> * the new value of the '{@link ProcessStep#getChildList()
> * childList}' feature.
> * @generated
> */
> public void setChildList(List<ProcessStep> newChildList) {
> childList = newChildList;
> }
>
> /**
> * Returns the value of '<em><b>parentList</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>parentList</b></em>' feature
> * @generated
> */
> public List<ProcessStep> getParentList() {
> return parentList;
> }
>
> /**
> * Adds to the <em>parentList</em> feature.
> * * @param parentListValue
> * the value to add
> * @return true if the value is added to the collection (it was not yet
> * present in the collection), false otherwise
> * @generated
> */
> public boolean addToParentList(ProcessStep parentListValue) {
> if (!parentList.contains(parentListValue)) {
> boolean result = parentList.add(parentListValue);
> return result;
> }
> return false;
> }
>
> /**
> * Removes from the <em>parentList</em> feature.
> * * @param parentListValue
> * the value to remove
> * @return true if the value is removed from the collection (it existed in
> * the collection before removing), false otherwise
> * * @generated
> */
> public boolean removeFromParentList(ProcessStep parentListValue) {
> if (parentList.contains(parentListValue)) {
> boolean result = parentList.remove(parentListValue);
> return result;
> }
> return false;
> }
>
> /**
> * Clears the <em>parentList</em> feature.
> * * @generated
> */
> public void clearParentList() {
> while (!parentList.isEmpty()) {
> removeFromParentList(parentList.iterator().next());
> }
> }
>
> /**
> * Sets the '{@link ProcessStep#getParentList() <em>parentList</em>}'
> * feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param newParentList
> * the new value of the '{@link ProcessStep#getParentList()
> * parentList}' feature.
> * @generated
> */
> public void setParentList(List<ProcessStep> newParentList) {
> parentList = newParentList;
> }
>
> /**
> * Returns the value of '<em><b>workingStepList</b></em>' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @return the value of '<em><b>workingStepList</b></em>' feature
> * @generated
> */
> public List<WorkingsStep> getWorkingStepList() {
> return workingStepList;
> }
>
> /**
> * Adds to the <em>WorkingStepList</em> feature.
> * * @param workingStepListValue
> * the value to add
> * @return true if the value is added to the collection (it was not yet
> * present in the collection), false otherwise
> * @generated
> */
> public boolean addToWorkingStepList(WorkingsStep workingStepListValue) {
> if (!workingStepList.contains(workingStepListValue)) {
> boolean result = workingStepList.add(workingStepListValue);
> return result;
> }
> return false;
> }
>
> /**
> * Removes from the <em>WorkingStepList</em> feature.
> * * @param workingStepListValue
> * the value to remove
> * @return true if the value is removed from the collection (it existed in
> * the collection before removing), false otherwise
> * * @generated
> */
> public boolean removeFromWorkingStepList(WorkingsStep workingStepListValue) {
> if (workingStepList.contains(workingStepListValue)) {
> boolean result = workingStepList.remove(workingStepListValue);
> return result;
> }
> return false;
> }
>
> /**
> * Clears the <em>WorkingStepList</em> feature.
> * * @generated
> */
> public void clearWorkingStepList() {
> while (!workingStepList.isEmpty()) {
> removeFromWorkingStepList(workingStepList.iterator().next());
> }
> }
>
> /**
> * Sets the '{@link ProcessStep#getWorkingStepList()
> * <em>workingStepList</em>}' feature.
> * * <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @param newWorkingStepList
> * the new value of the '{@link ProcessStep#getWorkingStepList()
> * workingStepList}' feature.
> * @generated
> */
> public void setWorkingStepList(List<WorkingsStep> newWorkingStepList) {
> workingStepList = newWorkingStepList;
> }
>
> /**
> * A toString method which prints the values of all EAttributes of this
> * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
> * * @generated
> */
> @Override
> public String toString() {
> return "ProcessStep ";
> }
> }
>
>
>
> orm.annotationmodel:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <annotationsmodel:AnnotatedModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:annotationsmodel="http://www.eclipse.org/emf/texo/annotations/model"
> xmlns:ormannotations="http://www.eclipse.org/emf/texo/orm/ormannotations">
> <annotatedEPackages>
> <ePackage href="platform:/resource/de.processtool/model/processes.ecore#/"/>
> <ePackageAnnotations xsi:type="ormannotations:EPackageORMAnnotation" generateFullDbSchemaNames="false"
> maximumSqlNameLength="255" lowerCasedNames="false" upperCasedNames="false" enforceUniqueNames="false"
> useJoinTablesForContainment="false" useJoinTablesForNonContainment="true" generateJavaAnnotations="false"
> addOrderColumnToListMappings="false" renameSQLReservedNames="false" uniqueEntityNames="true"
> setDelimitedIdentifierTagInORM="true">
> <inheritance strategy="TABLE_PER_CLASS"/>
> </ePackageAnnotations>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
> <eClass href="platform:/resource/de.processtool/model/processes.ecore#//Station"/>
> <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
> <entity class="de.kisters.praesto.texo.processes.Station" name="processes_Station">
> <table name="processes_Station"/>
> </entity>
> <inheritance strategy="TABLE_PER_CLASS"/>
> </eClassAnnotations>
> </annotatedEClassifiers>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
> <eClass href="platform:/resource/de.processtool/model/processes.ecore#//Numerator"/>
> <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
> <entity class="de.kisters.praesto.texo.processes.Numerator" name="processes_Numerator"/>
> <mappedSuperclass access="FIELD" class="de.kisters.praesto.texo.processes.Numerator"/>
> </eClassAnnotations>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
> <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Numerator/number"/>
> <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
> <basic name="number" optional="false"/>
> </eAttributeAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
> <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Numerator/name"/>
> <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
> <basic name="name" optional="false"/>
> </eAttributeAnnotations>
> </annotatedEStructuralFeatures>
> </annotatedEClassifiers>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
> <eClass href="platform:/resource/de.processtool/model/processes.ecore#//Process"/>
> <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
> <entity class="de.kisters.praesto.texo.processes.Process" name="processes_Process">
> <table name="processes_Process"/>
> </entity>
> <inheritance strategy="TABLE_PER_CLASS"/>
> </eClassAnnotations>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
> <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Process/childTransition"/>
> <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
> <basic enumerated="STRING" name="childTransition"/>
> </eAttributeAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
> <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//Process/parentTransition"/>
> <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
> <basic enumerated="STRING" name="parentTransition"/>
> </eAttributeAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/station"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="station" optional="true">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/childList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToMany name="childList">
> <joinTable name="processes_Process_Child"/>
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/parentList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToMany name="parentList">
> <joinTable name="processes_Process_Parent"/>
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/firstProcessStep"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="firstProcessStep">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//Process/processStepList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToMany name="processStepList">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> </annotatedEClassifiers>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEEnum">
> <eEnum href="platform:/resource/de.processtool/model/processes.ecore#//Transition"/>
> <eEnumAnnotations xsi:type="ormannotations:EEnumORMAnnotation"/>
> <annotatedEEnumLiterals>
> <eEnumLiteral href="platform:/resource/de.processtool/model/processes.ecore#//Transition/MANUALLY"/>
> </annotatedEEnumLiterals>
> <annotatedEEnumLiterals>
> <eEnumLiteral href="platform:/resource/de.processtool/model/processes.ecore#//Transition/MECHANICALLY"/>
> </annotatedEEnumLiterals>
> </annotatedEClassifiers>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
> <eClass href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep"/>
> <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
> <entity class="de.kisters.praesto.texo.processes.ProcessStep" name="processes_ProcessStep">
> <table name="processes_ProcessStep"/>
> </entity>
> <inheritance strategy="TABLE_PER_CLASS"/>
> </eClassAnnotations>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/firstWorkingStep"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="firstWorkingStep" optional="true">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/workingStepList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <oneToMany name="workingStepList">
> <cascade>
> <cascadeAll/>
> </cascade>
> </oneToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/childList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToMany name="childList">
> <joinTable name="processes_ProcessStep_Child"/>
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessStep/parentList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToMany name="parentList">
> <joinTable name="processes_ProcessStep_Parent"/>
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> </annotatedEClassifiers>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
> <eClass href="platform:/resource/de.processtool/model/processes.ecore#//WorkingsStep"/>
> <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
> <entity class="de.kisters.praesto.texo.processes.WorkingsStep" name="processes_WorkingsStep">
> <table name="processes_WorkingStep"/>
> </entity>
> <inheritance strategy="TABLE_PER_CLASS"/>
> </eClassAnnotations>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//WorkingsStep/childWorkingStep"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="childWorkingStep" optional="true">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//WorkingsStep/parentWorkingStep"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="parentWorkingStep" optional="true">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> </annotatedEClassifiers>
> <annotatedEClassifiers xsi:type="annotationsmodel:AnnotatedEClass">
> <eClass href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel"/>
> <eClassAnnotations xsi:type="ormannotations:EClassORMAnnotation">
> <entity class="de.kisters.praesto.texo.processes.ProcessModel" name="processes_ProcessModel"/>
> <inheritance strategy="TABLE_PER_CLASS"/>
> </eClassAnnotations>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
> <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/description"/>
> <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
> <basic name="description"/>
> </eAttributeAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEAttribute">
> <eAttribute href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/name"/>
> <eAttributeAnnotations xsi:type="ormannotations:EAttributeORMAnnotation">
> <basic name="name"/>
> </eAttributeAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/processList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <oneToMany name="processList">
> <joinTable catalog="" name="processmodel_to_processes" schema=""/>
> <cascade>
> <cascadeAll/>
> </cascade>
> </oneToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/stationList"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <oneToMany name="stationList">
> <joinTable name="processmodel_to_stations"/>
> <cascade>
> <cascadeAll/>
> </cascade>
> </oneToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/startProcess"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="startProcess">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/endProcess"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <manyToOne name="endProcess">
> <cascade>
> <cascadePersist/>
> <cascadeMerge/>
> <cascadeRefresh/>
> </cascade>
> </manyToOne>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> <annotatedEStructuralFeatures xsi:type="annotationsmodel:AnnotatedEReference">
> <eReference href="platform:/resource/de.processtool/model/processes.ecore#//ProcessModel/processSteps"/>
> <eReferenceAnnotations xsi:type="ormannotations:EReferenceORMAnnotation">
> <oneToMany name="processSteps">
> <cascade>
> <cascadeAll/>
> </cascade>
> </oneToMany>
> </eReferenceAnnotations>
> </annotatedEStructuralFeatures>
> </annotatedEClassifiers>
> </annotatedEPackages>
> </annotationsmodel:AnnotatedModel>
>


--

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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] parent/child relations are not persisted [message #1258262 is a reply to message #1257819] Thu, 27 February 2014 08:06 Go to previous message
peter meyer is currently offline peter meyerFriend
Messages: 13
Registered: September 2012
Junior Member
Hi Martin,

yes i use an orm.xml.
Here is the mapping part for ProcessStep:
  <orm:entity class="de.kisters.praesto.texo.processes.ProcessStep" name="processes_ProcessStep">
    <orm:table name="processes_ProcessStep"/>
    <orm:attributes>
      <orm:many-to-one name="firstWorkingStep" optional="true">
        <orm:cascade>
          <orm:cascade-persist/>
          <orm:cascade-merge/>
          <orm:cascade-refresh/>
        </orm:cascade>
      </orm:many-to-one>
      <orm:one-to-many name="workingStepList">
        <orm:cascade>
          <orm:cascade-all/>
        </orm:cascade>
      </orm:one-to-many>
      <orm:many-to-many name="childList">
        <orm:join-table name="processes_ProcessStep_Child"/>
        <orm:cascade>
          <orm:cascade-persist/>
          <orm:cascade-merge/>
          <orm:cascade-refresh/>
        </orm:cascade>
      </orm:many-to-many>
      <orm:many-to-many name="parentList">
        <orm:join-table name="processes_ProcessStep_Parent"/>
        <orm:cascade>
          <orm:cascade-persist/>
          <orm:cascade-merge/>
          <orm:cascade-refresh/>
        </orm:cascade>
      </orm:many-to-many>
    </orm:attributes>
  </orm:entity>


king regards
Peter
Previous Topic:starting ECP demo without EMFStore
Next Topic:Overriding attributes of EStructuralFeature
Goto Forum:
  


Current Time: Tue Nov 25 22:28:18 GMT 2014

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

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