openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bernard (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1541) Support Enum as Primary Key Type
Date Tue, 21 Sep 2010 10:14:32 GMT


bernard commented on OPENJPA-1541:

AFAIK JSR220 (EJB 3.0) and JSR317 (JPA 2.0) do not include enums in id fields. Marc, may I
ask which provider you are using and why you want to migrate?

> Support Enum as Primary Key Type
> --------------------------------
>                 Key: OPENJPA-1541
>                 URL:
>             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:
> 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.
You can reply to this email to add a comment to the issue online.

View raw message