Author: aadamchik
Date: Sun Sep 2 10:22:49 2007
New Revision: 572038
URL: http://svn.apache.org/viewvc?rev=572038&view=rev
Log:
latest cayenne code
* no need to list classes in persistence.xml
* fixed bug with classloader ordering
Modified:
cayenne/sandbox/cayenne-jpa-tutorial/lib/cayenne-agent-3.0-SNAPSHOT.jar
cayenne/sandbox/cayenne-jpa-tutorial/lib/cayenne-server-3.0-SNAPSHOT.jar
cayenne/sandbox/cayenne-jpa-tutorial/src/META-INF/persistence.xml
cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Artist.java
cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Main.java
Modified: cayenne/sandbox/cayenne-jpa-tutorial/lib/cayenne-agent-3.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-jpa-tutorial/lib/cayenne-agent-3.0-SNAPSHOT.jar?rev=572038&r1=572037&r2=572038&view=diff
==============================================================================
Binary files - no diff available.
Modified: cayenne/sandbox/cayenne-jpa-tutorial/lib/cayenne-server-3.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-jpa-tutorial/lib/cayenne-server-3.0-SNAPSHOT.jar?rev=572038&r1=572037&r2=572038&view=diff
==============================================================================
Binary files - no diff available.
Modified: cayenne/sandbox/cayenne-jpa-tutorial/src/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-jpa-tutorial/src/META-INF/persistence.xml?rev=572038&r1=572037&r2=572038&view=diff
==============================================================================
--- cayenne/sandbox/cayenne-jpa-tutorial/src/META-INF/persistence.xml (original)
+++ cayenne/sandbox/cayenne-jpa-tutorial/src/META-INF/persistence.xml Sun Sep 2 10:22:49
2007
@@ -3,9 +3,6 @@
<persistence-unit name="cayenne-tutorial">
<description>Cayenne JPA Tutorial</description>
<non-jta-data-source>local-data-source</non-jta-data-source>
- <class>cayenne.jpa.tutorial.Artist</class>
- <class>cayenne.jpa.tutorial.Gallery</class>
- <class>cayenne.jpa.tutorial.Painting</class>
<properties>
<property name="org.apache.cayenne.datasource.jdbc.driver"
value="org.apache.derby.jdbc.EmbeddedDriver" />
Modified: cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Artist.java
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Artist.java?rev=572038&r1=572037&r2=572038&view=diff
==============================================================================
--- cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Artist.java (original)
+++ cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Artist.java Sun Sep 2 10:22:49
2007
@@ -24,7 +24,7 @@
@Column(name = "DATE_OF_BIRTH")
protected Date dateOfBirth;
- @OneToMany(targetEntity = Painting.class)
+ @OneToMany(targetEntity = Painting.class, mappedBy = "artist")
protected Collection<Painting> paintings;
public String getName() {
Modified: cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Main.java
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Main.java?rev=572038&r1=572037&r2=572038&view=diff
==============================================================================
--- cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Main.java (original)
+++ cayenne/sandbox/cayenne-jpa-tutorial/src/cayenne/jpa/tutorial/Main.java Sun Sep 2 10:22:49
2007
@@ -8,11 +8,6 @@
public static void main(String[] args) {
// create entity manager
-
- // due to the current enhancer limitations, separate all work with
- // entities in a separate Tutorial class, so that the Entity classes are
- // loaded only after the provider is initialized
-
EntityManagerFactory emf = Persistence
.createEntityManagerFactory("cayenne-tutorial");
try {
|