Here's my hacked version of EntityLoader that worked for me:
| @Name("org.jboss.seam.ui.entityLoader")
| @Scope(STATELESS)
| public class CustomEntityLoader extends EntityLoader {
|
| @Override
| protected Identifier createIdentifier(Object entity) {
| return new CustomEntityIdentifier(entity,
getPersistenceContext());
| }
| }
|
| public class CustomEntityIdentifier extends EntityIdentifier {
|
| public CustomEntityIdentifier(Object entity, EntityManager
entityManager) {
| super(entity, entityManager);
| }
|
| @Override
| public Object find(EntityManager entityManager) {
| Object result = super.find(entityManager);
|
| if (result instanceof HibernateProxy) {
| return ((HibernateProxy)
result).getHibernateLazyInitializer()
| .getImplementation((SessionImplementor)
entityManager.getDelegate());
| }
|
| return result;
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123770#4123770
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123770
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user