I've been playing around trying to get MOXy generate JPA annotations from a simple XML Schema. Using the schema below, I run MOXy and receive Java class listed below. I was sort of expecting (probably incorrectly) to get the JPA style annotations; however, I received the JAXB style annotations. Is there a way to get the JPA annotations from an XML schema using MOXy?
Thanks in advance //--- Begin schema <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="customer" type="customer-type"/> <xsd:complexType name="customer-type"> <xsd:attribute name="id" type="xsd:integer"/> </xsd:complexType> </xsd:schema> //--- End schema //--- Begin MOXy generated class package com.test.simple; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "customer-type") public class CustomerType { @XmlAttribute(name = "id") protected BigInteger id; public BigInteger getId() { return id; } public void setId(BigInteger value) { this.id = value; } } //--- End MOXy generated class //--- What I was expecting/want package com.test.simple; @Entity public class CustomerType { @Id @Column(name="id") protected BigInteger id; public BigInteger getId() { return id; } public void setId(BigInteger value) { this.id = value; } } //--- End what I was expecting/want -- View this message in context: http://openjpa.208410.n2.nabble.com/XSD-to-JPA-with-MOXy-tp5949227p5949227.html Sent from the OpenJPA Users mailing list archive at Nabble.com.