OK.  I'm beginning to think that I may be on the cutting edge :-) of using
the ReverseMappingTool and I have lots of small suggestions that could be
turned into patches.  What's the best way to submit or vet them?

Best,
Laird

On Sat, Feb 13, 2010 at 4:59 AM, Miłosz Tylenda [via OpenJPA] <
[email protected]<ml-node%[email protected]>
> wrote:

>
> Hi Laird,
>
> I haven't dug into the ReverseMappingTool although the output you have
> presented does not look good to me either.
>
> Trying to enlighten the datastore identity thing, I consider it as a case
> when your Entity has no field for primary key. Instead, OpenJPA keeps it and
> manages under the hood. I would expect the tool to generate @DataStoreId on
> the entity class [1].
>
> Greetings,
> Milosz
>
> [1]
> http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_oid_datastore
>
>
>
> > 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
> >
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/Datastore-identity-and-ReverseMappingTool-tp4562286p4565598.html
> To start a new topic under OpenJPA Users, email
> [email protected]<ml-node%[email protected]>
> To unsubscribe from OpenJPA Users, click here< (link removed) =>.
>
>
>

-- 
View this message in context: 
http://n2.nabble.com/Datastore-identity-and-ReverseMappingTool-tp4562286p4566329.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to