openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolf <>
Subject Cannot get ReverseMappingTool to work
Date Tue, 05 Feb 2013 17:42:56 GMT
For the first few iterations of development, I was using a JPA Eclipse
plugin to generation my entities from their corresponding tables -
this all worked fine, but now I need to implement a reproducible
process for a build script, so I thought it wold be appropriate to
ReverseMappingTool, and it comes close, but not quite close enough to
generating usable entity classes.  I only have three tables - master,
detail and link table for many-to-many relationship.

The JPA Eclipse plugin properly figures out the many-to-many
relationship and generates the appropriate annotations:

e.g. @ManyToMany(mappedBy="mdBaseData"...)
and @JoinTable(name="..", joinColumns={@JoinColumn(name="id2",
nullable=false)}, inverseJoinColumns={@JoinColumn(name="id1",

The ReverseMappingTool is not producing these annotations.

Here is how I am invoking it:

java -cp $CP org.apache.openjpa.jdbc.meta.ReverseMappingTool -p
persistence.xml#marketdata \
    -cf.tabSpaces 4 -cf.spaceBeforeParen t -pkg poc.demo.entities \
    -gc t -ann t -sn f -pkj t -ir t -access property -typ
NUMBER=java.math.BigDecimal \
    -d ./../../main/java -cp \

poc.demo.entities.MdCurveData.identity: datastore
poc.demo.entities.MdBaseData.mdCurveData: java.util.Collection

I am deleting all entities and orm.xml between runs.

In addition to having ReverseMappingTool create the relationship
annotations, I'd like to know how to tell it to decorate certain date
columns with:
 @Temporal( TemporalType.DATE)

Of course, I already read:

If anyone could help, that would be great.



View raw message