[jboss-user] [JBoss Seam] - Re: EntityHome and Primay Key value assignment for new recor
terryb
do-not-reply at jboss.com
Thu Oct 11 00:41:37 EDT 2007
I tried @PrePersist but got struck with popular hibernate bug... Id must be be assigned manually..., it's to do with hibernate doing validations before invoking PrePersist I think...
The bug is fixed in latest hibernate GA release, but I am not sure what else will break if i use it with Redhat Developer Beta 1.
So as a workaround, Im keeping my code in MyEntityHome for now, as above.
Q2. I was trying to use my generated Id as a default value for the jsf h:inputHidden tag. The tage is bound to the ID property of the entity bean. So I thought that way it will work automatically, as JSF will assign value in hidden bound control to the backing entity bean.
I just couldn't figure out how to have h:inputHidden bound to the entity property and at the same time make it use my generate Id as a default value.
h:inputHidden id="code" required="true" size="50" maxlength="50" value="#{securityRoleHome.instance.id}"
/h:inputHidden
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093849#4093849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093849
More information about the jboss-user
mailing list