Author: pete.muir(a)jboss.org
Date: 2008-01-24 08:55:21 -0500 (Thu, 24 Jan 2008)
New Revision: 7221
Modified:
trunk/src/main/org/jboss/seam/framework/EntityIdentifier.java
trunk/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java
Log:
JBSEAM-2527
Modified: trunk/src/main/org/jboss/seam/framework/EntityIdentifier.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/EntityIdentifier.java 2008-01-24 12:40:17 UTC
(rev 7220)
+++ trunk/src/main/org/jboss/seam/framework/EntityIdentifier.java 2008-01-24 13:55:21 UTC
(rev 7221)
@@ -3,7 +3,6 @@
import javax.persistence.EntityManager;
import javax.transaction.SystemException;
-import org.jboss.seam.Entity;
import org.jboss.seam.persistence.PersistenceProvider;
import org.jboss.seam.transaction.Transaction;
@@ -11,7 +10,8 @@
{
public EntityIdentifier(Object entity, EntityManager entityManager)
{
- super(Entity.forClass(entity.getClass()).getBeanClass(),
PersistenceProvider.instance().getId(entity, entityManager));
+ super(PersistenceProvider.instance().getBeanClass(entity),
PersistenceProvider.instance().getId(entity, entityManager));
+
}
public EntityIdentifier(Class clazz, Object id)
Modified: trunk/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java 2008-01-24
12:40:17 UTC (rev 7220)
+++ trunk/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java 2008-01-24
13:55:21 UTC (rev 7221)
@@ -3,13 +3,14 @@
import java.io.Serializable;
import org.hibernate.Session;
+import org.jboss.seam.persistence.HibernatePersistenceProvider;
public class HibernateEntityIdentifier extends Identifier<Session>
{
public HibernateEntityIdentifier(Object entity, Session session)
{
- super(entity.getClass(), session.getIdentifier(entity));
+ super(HibernatePersistenceProvider.instance().getBeanClass(entity),
session.getIdentifier(entity));
}
public HibernateEntityIdentifier(Class clazz, Object id)
Show replies by date