openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (OPENJPA-1100) @Version-Annotation on Column with unsupported type (e.g. BigDecimal) is silently ignored, but should raise an error
Date Fri, 28 Aug 2009 00:06:59 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pinaki Poddar reassigned OPENJPA-1100:
--------------------------------------

    Assignee: Pinaki Poddar

> @Version-Annotation on Column with unsupported type (e.g. BigDecimal) is silently ignored,
but should raise an error
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1100
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1100
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: Windows XP, Java SDK 1.6, Websphere 6.1 + openJPA 1.2.1
>            Reporter: Heiko Kopp
>            Assignee: Pinaki Poddar
>
> In the following example, the @Version annotated field 'version' does have a wrong type
(none of the supported ones).
> @Entity
> @Table(name = "PARTNER", schema = "PART")
> public class Partner
> {
>     @Id
>     @Column(name = "PART_KEY")
>     private BigDecimal partKey;
>     @OneToMany(mappedBy = "partner", fetch = FetchType.LAZY)
>     private List<PartnerRolle> rollen;
> }
> @Entity
> @Table(name = "PARTNERROLLE")
> public class PartnerRolle
> {
>     @EmbeddedId
>     private PartnerRolleKey key;
>     @Version
>     @Column(name = "VERSION")
>     private BigDecimal version;
>     @ManyToOne(fetch = FetchType.LAZY)
>     @JoinColumn(name = "PART_KEY")
>     private Partner partner;
> }
> This does NOT lead to an error but silently omits the column in any query statements.
The prepared statement (prepstmt) simply omitts the column. If the @Version is removed or
a supported type like 'long' is used, the behaviour is correct.
> Best regards,
> Heiko

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message