[jboss-user] [JBoss Seam] - Re: EntityConverter: Entity Manager not found

mgrouch do-not-reply at jboss.com
Tue Aug 7 18:18:48 EDT 2007

anonymous wrote : 3) No support for xml mapped entities (and you're not going to get this to work afaics) 

It is possible to get it work using Hibernate API. We need access to hibernate session object and entity.
getSession().getSessionFactory().getClassMetadata(getPersistentClass()).getIdentifier(entity, mode) should give Id in case if entities are not using annotations.

anonymous wrote : 4) correct implementation of toString() on all keys (think about composite keys here) 

Yes. But default implementation would work too (I haven't checked though). Default implementation of toString would produce too long string in HTML, but it might even work as is.

How do you handle composite keys with entityConverter? I think this can be done same way after all we do need to create a string out of composite key to use it in HTML.

anonymous wrote : 1) You must extend EntitySelector in code. This works very badly with the Seam Framework and components.xml 

Not sure why extending it would be a problem...

anonymous wrote : 2) To keep your entities managed, you must cache all entities in your dropdown in the conversation scope (yes, I know you can put them in the event or page scope, but then they won't be managed). 

Even if they are not managed you can always get access to managed entity
by calling finder by ID. It is a little inconvenience for some, but at least
solution for dropdowns will work for everyone (even those who do not use SMPC). Dropdown are usually read-only entities anyway...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071772#4071772

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071772

More information about the jboss-user mailing list