13 Replies Latest reply on Oct 23, 2009 3:25 PM by aloubyansky

    How to retrieve the value of a "fixed" attribute

    epbernard

      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"/>