openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bernard (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-1541) Support Enum as Primary Key Type
Date Sun, 22 May 2011 08:06:47 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037529#comment-13037529
] 

bernard commented on OPENJPA-1541:
----------------------------------

Still not supported in 2.1.0

All the others: TopLink, EclipseLink, DataNucleus, Hibernate support it.


> Support Enum as Primary Key Type
> --------------------------------
>
>                 Key: OPENJPA-1541
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1541
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: competitive, jpa
>    Affects Versions: 2.0.0-beta
>         Environment: All
>            Reporter: bernard
>            Priority: Critical
>
> Enums work as primary keys in TopLink and EclipseLink. DataNucleus supports them, too:
> http://www.datanucleus.org/products/accessplatform/jpa/primary_key.html
> It would be good to also include this in the specification because, not to support type
safety in primary keys is fairly sad.
> Enum is a basic language feature, and most applications would enjoy significant benefits
by mapping the keys of those little system behavior controlling lookup tables to enums.
> Consider a payment_type table. One can only generate the IDs of the table and use them
for switching safely when the ids are mapped to enums. Any such application would typically
have a PaymentType enum anyway.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message