Author: amarkhel
Date: 2008-12-02 03:30:56 -0500 (Tue, 02 Dec 2008)
New Revision: 11477
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
Log:
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2008-12-02
05:38:59 UTC (rev 11476)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2008-12-02
08:30:56 UTC (rev 11477)
@@ -69,7 +69,7 @@
String login = image.getAlbum().getOwner().getLogin();
String albumName = image.getAlbumName();
image.getAlbum().removeImage(image);
- Album album = (Album)em.createQuery("from Album a where a.name=:albumName and
a.owner.name=:login").setParameter("albumName",
albumName).setParameter("owner", login).getSingleResult();
+ Album album = (Album)em.createQuery("from Album a where a.name=:albumName and
a.owner.login=:login").setParameter("albumName",
albumName).setParameter("owner", login).getSingleResult();
album.addImage(image);
em.merge(album);
}
Show replies by date