Author: pete.muir(a)jboss.org
Date: 2008-09-18 14:34:52 -0400 (Thu, 18 Sep 2008)
New Revision: 9019
Modified:
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java
Log:
slight change to allow mysql to be used as the database
Modified: trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java
===================================================================
---
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java 2008-09-18
12:55:01 UTC (rev 9018)
+++
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java 2008-09-18
18:34:52 UTC (rev 9019)
@@ -4,6 +4,7 @@
import java.util.List;
import javax.persistence.CascadeType;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -20,9 +21,10 @@
private String name;
@OneToMany(mappedBy="artist", cascade={CascadeType.MERGE,
CascadeType.PERSIST, CascadeType.REFRESH})
- @OrderBy("release")
+ @OrderBy("_release")
private List<Disc> discs;
+ @Column(length=5000)
private String description;
public Artist()
Modified: trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java
===================================================================
---
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java 2008-09-18
12:55:01 UTC (rev 9018)
+++
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java 2008-09-18
18:34:52 UTC (rev 9019)
@@ -3,6 +3,7 @@
import java.util.Date;
import javax.persistence.CascadeType;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -19,12 +20,12 @@
private String name;
- private Integer release;
+ private Integer _release;
@ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
private Artist artist;
-
+ @Column(length=5000)
private String description;
public Disc()
@@ -78,12 +79,12 @@
public Integer getRelease()
{
- return release;
+ return _release;
}
public void setRelease(Integer release)
{
- this.release = release;
+ this._release = release;
}
}
Show replies by date