Hi Gordon
There are no changes to VersionLockingPolicy. I was just being very
elaborate in my explanation as to the code flow :-) .
Thanks
Pramod
Gordon Yorke wrote:
> Pramod
> I only got the change for MetadataProcessor. Can you send the VersionLockingPolicy file as well? Thanks
> --Gordon
>
> -----Original Message-----
> From: Pramod Gopinath [mailto:Pramod.Gopinath_at_Sun.COM]
> Sent: Thursday, March 16, 2006 5:13 PM
> To: Gordon Yorke
> Cc: persistence_at_glassfish.dev.java.net
> Subject: Code changes relevant to issue 349 - java2db and @Version
> datatype
>
>
> Hi Gordon
> The code change is to deal with the fact that for @Version field we
> are not setting the field type. So for a number field during java2db we
> are always creating a field of type BigDecimal and ignoring the type of
> the field on which the @Version has been defined.
>
> The solution has been made in
> src/java/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.processAccessor()
> to set the databasefield type correctly.
>
> If the type is correctly then
> src/java/oracle/toplink/essentials/descriptors/VersionLockingPolicy.
> initializeProperties() will not set the type of the field to BigDecimal.
>
> I have attached the diffs and jar file. Also ran the
> entity-persistence-tests and all passed.
>
> Thanks
> Pramod
>
>