1 Sep 02:05
Java JPA Annotation Syntax Support
Hi,
For those on the svn version and willing to try things out.
I have added the possibility to specify jpa annotations using the java source code syntax. This
makes it probably much easier to specify jpa annotations in the model.
To use this format the eannotation should have the source teneo.jpa (or teneo.hibernate for
hibernate specific annotations).
As an example for (in xml schema):
<xsd:complexType name="Printer">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@SecondaryTable(name="THETONER"
pkJoinColumns={@PrimaryKeyJoinColumn(name="PRINTER_ID")})
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>....</sequence>
other example:
<xsd:element name="tonerMake" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">@Column(table="THETONER")</xsd:appinfo>
</xsd:annotation>
</xsd:element>
more complex Hibernate specific example:
<xsd:appinfo source="teneo.hibernate">
@GenericGenerator(name="hibseq", strategy = "hilo",
parameters = {
@Parameter(name="table", value = "hilo_table"),
@Parameter(name="column", value="the_hilo_column")
}
)
</xsd:appinfo>
The previous eannotation sources (http://annotation.elver.org/, http://ejb.elver.org) will remain
to
work with the old format.
The eannotations with the sources teneo.jpa, teneo.hibernate. teneo.mapping will work with the new
format.
This java jpa annotation syntax has not yet been tested thoroughly.
Feedback is as always welcome.
--
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@... - mtaal@...
Web: www.springsite.com - www.elver.org
RSS Feed