I am baffled at the output of the ReverseMappingTool in OpenJPA 1.2.2 when
it comes to datastore identity.

Perhaps I am missing what datastore identity is.  I had assumed that a class
conceptually has datastore identity when it has, for example, an
auto-assigned primary key.  In such a case I'd expect the ReverseMapping
tool to omit any setters for this field, and to disallow its presence in
constructors.

I'd also expect the annotations produced to involve @GeneratedValue (or
whatever it is; typing from memory).

Instead I see a syntactically invalid @PrimaryKeyJoinColumn annotation
mushed into the @Table annotation, and basically nothing else (i.e. no other
mention whatsoever of the primary key column in the mapping):

@Entity
@Table(schema="foobar", name="bizbaw", @PrimaryKeyJoinColumn(name="pk",
columnDefinition="serial"))
public class Blah {

What on *earth* is happening here?  As far as I can tell, this comes about
if I turn the useDatastoreIdentity property on in the reverse mapping tool.

I scanned the source base and then discovered that there's nothing in the
annotation serializer that even attempts to use @GeneratedValue.  Am I on my
own for this?

Thanks,
Laird

Reply via email to