Author: amarkhel
Date: 2009-03-30 14:40:13 -0400 (Mon, 30 Mar 2009)
New Revision: 13307
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
Log:
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-30
18:36:53 UTC (rev 13306)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-30
18:40:13 UTC (rev 13307)
@@ -202,11 +202,11 @@
throw new IllegalArgumentException("Null shelf");
}
//TODO nick - check if owner is current user?
- if(shelf.getOwner().equals(this)){
+ if(shelf.getOwner().getLogin().equals(this.getLogin())){
shelf.setOwner(null);
shelfs.remove(shelf);
}else{
- throw new IllegalArgumentException("Shelf not belonfs to this
user!");
+ throw new IllegalArgumentException("Shelf not belongs to this
user!");
}
}
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-03-30
18:36:53 UTC (rev 13306)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-03-30
18:40:13 UTC (rev 13307)
@@ -59,7 +59,6 @@
public void deleteShelf(Shelf shelf){
user.removeShelf(shelf);
- em.remove(shelf);
if(flushStrategy.isDatabaseStoreStrategy()){
em.flush();
}
Show replies by date