[richfaces-svn-commits] JBoss Rich Faces SVN: r13558 - in trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld: service and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Apr 14 07:57:28 EDT 2009


Author: amarkhel
Date: 2009-04-14 07:57:28 -0400 (Tue, 14 Apr 2009)
New Revision: 13558

Modified:
   trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
   trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
   trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
Log:


Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java	2009-04-14 01:55:10 UTC (rev 13557)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java	2009-04-14 11:57:28 UTC (rev 13558)
@@ -89,7 +89,7 @@
     @Temporal(TemporalType.TIMESTAMP)
     private Date created;
 
-    @OneToOne(cascade = CascadeType.ALL, optional = true)
+    @OneToOne(optional = true)
     private Image coveringImage;
 
     // ********************** Accessor Methods ********************** //

Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java	2009-04-14 01:55:10 UTC (rev 13557)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java	2009-04-14 11:57:28 UTC (rev 13558)
@@ -120,7 +120,7 @@
     @Length(min = 3)
     private String path;
 
-    @ManyToMany(cascade = CascadeType.ALL)
+    @ManyToMany(cascade = CascadeType.PERSIST)
     @JoinTable(name = "IMAGES_METATAGS",
             joinColumns =
             @JoinColumn(name = "CI_IMAGE_ID",
@@ -440,7 +440,7 @@
      * @return if this image is covering for containing album
      */
     public boolean isCovering() {
-        return this.equals(this.getAlbum().getCoveringImage());
+        return covering;
     }
 
     /**

Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java	2009-04-14 01:55:10 UTC (rev 13557)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java	2009-04-14 11:57:28 UTC (rev 13558)
@@ -86,7 +86,9 @@
             //Populate set of tokens - 'candidates to metatags'
             Set<String> toks = new HashSet<String>();
             for (String s : tokens) {
-                toks.add(s.trim());
+            	if(!s.equals("")){
+            		toks.add(s.trim());
+            	}
             }
             
             for (String s : toks) {
@@ -110,6 +112,7 @@
                             em.persist(t);
                 		}
                 	}
+                t = null;
             }
             
             for (MetaTag tag : removals) {




More information about the richfaces-svn-commits mailing list