[jboss-dev-forums] [JBoss XML Binding Development] - How to retrieve the value of a "fixed" attribute

epbernard do-not-reply at jboss.com
Fri Oct 23 08:51:49 EDT 2009


JPA 2 has added a new attribute to the persistence-unit element. It is required but is fixed at the same time so the user doesn't have to set it explicitly.

I can't seem to find a way to let JBoss XB to populate my mapped attribute with he fixed value. I always end up with null. How can I do that?

PS: I can't hard code the value as the binding model is supposed to bind both JPA1 and JPA2 so null != 2.0

Here is the attribute declaration
<xsd:attribute name="version" type="persistence:versionType"
  |                      fixed="2.0" use="required"/>

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

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



More information about the jboss-dev-forums mailing list