Author: pete.muir(a)jboss.org
Date: 2008-01-24 09:04:36 -0500 (Thu, 24 Jan 2008)
New Revision: 7222
Modified:
branches/Seam_2_0/src/main/org/jboss/seam/framework/EntityIdentifier.java
branches/Seam_2_0/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java
Log:
Backport JBSEAM-2527
Modified: branches/Seam_2_0/src/main/org/jboss/seam/framework/EntityIdentifier.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/framework/EntityIdentifier.java 2008-01-24
13:55:21 UTC (rev 7221)
+++ branches/Seam_2_0/src/main/org/jboss/seam/framework/EntityIdentifier.java 2008-01-24
14:04:36 UTC (rev 7222)
@@ -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:
branches/Seam_2_0/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java
===================================================================
---
branches/Seam_2_0/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java 2008-01-24
13:55:21 UTC (rev 7221)
+++
branches/Seam_2_0/src/main/org/jboss/seam/framework/HibernateEntityIdentifier.java 2008-01-24
14:04:36 UTC (rev 7222)
@@ -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)