You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pp...@apache.org on 2008/11/21 17:31:46 UTC
svn commit: r719627 -
/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
Author: ppoddar
Date: Fri Nov 21 08:31:45 2008
New Revision: 719627
URL: http://svn.apache.org/viewvc?rev=719627&view=rev
Log:
Elaborate on usage of Entity Reference as part of compound key
Modified:
openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml?rev=719627&r1=719626&r2=719627&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml Fri Nov 21 08:31:45 2008
@@ -679,6 +679,10 @@
...
}
+ /**
+ * LineItem uses a compound primary key. Part of the compound key
+ * LineItemId is relation or refernce to Order instance.
+ **/
@Entity
@IdClass(LineItemId.class)
public class LineItem {
@@ -696,9 +700,9 @@
public class LineItemId {
public int index;
- public long order; // same type as order's identity
-
- ...
+ public long order; // same type as identity of Order i.e Order.id
+ // also the variable name must match the name of the
+ // variable in LineItem that refers to Order.
}
</programlisting>
</example>