persistence@glassfish.java.net

Re: [Fwd: Fix for issue 699 and 702]

From: Markus Fuchs <Markus.Fuchs_at_Sun.COM>
Date: Tue, 12 Sep 2006 10:34:25 -0700

Hi Gordon,

The spec says about insertable:

insertable (Optional) Whether the column is included in
SQL INSERT statements generated by the persistence
provider.

This sounds like we *should* validate that the field mapped to this
column is not set by the user. Setting the field and the column isn't
included in the insert statement, is probably not what the user expects.
We should also prevent PK updates.

What do you think about the insertable=false, updatable=false annotation
on the "id" field in PhoneNumber.java? Shall we move this annotation to
the "owner" field? To indicate an overlapping PK/FK situation, the
relationship field should be annotated insertable=false,
updatable=false, not the primary key field.

Thanks!

-- markus.

Gordon Yorke wrote:

>Hello Markus,
> I don't think updatable, insertable settings should be validated. The specification explicitly states that these settings control what columns should be include in the SQL statements. These values should alter what TopLink writes to the database but forcing validation on the user restricts usage and would be counter to the specification.
>--Gordon
>
>-----Original Message-----
>From: Markus.Fuchs_at_Sun.COM [mailto:Markus.Fuchs_at_Sun.COM]On Behalf Of
>Markus Fuchs
>Sent: Monday, September 11, 2006 9:05 PM
>To: Tom Ware
>Cc: persistence_at_glassfish.dev.java.net
>Subject: [Fwd: Fix for issue 699 and 702]
>
>
>Resending, copying the persistence alias.
>
>-- markus.
>
>
>