-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Hello,
This is a strange behaviors with Hyperjaxb ( tested with 0.5.6 and latest ).
If i specify a javaType (with parse and print method) to an attribute which is a part a composite key, then hyperjaxb create an IdClass (ok, composed with all keys attributes) but with the attribute typed as String ( and not Date as the following example ).
<jaxb:bindings node="xsd:element[@name='timestamp']" multiple="true" required="false" >
<jaxb:javaType name="java.util.Date"
parseMethod="com.test.RFC2282DateAdapter.parseDate"
printMethod="com.test.RFC2282DateAdapter.printDate"/>
</jaxb:bindings>
Results :
@XmlAccessorType(XmlAccessType.FIELD)
public static class TickerId {
@XmlSchemaType(name = "dateTime")
protected String timestamp; // Should be a Date there !!
protected String currency; // Other part of the composite key, that's ok
...
}
If i remove the binding an XMLGregorianCalendar is generated (i don't want this), moreover a parse exception is throwed. That's normal because the string date format found is not recognized as the standard date format.