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

Daniel Cunha (soro) commented on DELTASPIKE-910:
------------------------------------------------

This case, we need to have a special implementation for discovery Entity ID 
when the is provide by OpenJPA, because OpenJPA return an OpenJPAId:

http://mail-archives.apache.org/mod_mbox/openjpa-dev/201506.mbox/%3ccahlhu44m6hkcrec2iirxnwmbfus0_lfqist6vowrpbmhr_j...@mail.gmail.com%3E

or we can use EntityUtils like this:

https://github.com/danielsoro/deltaspike/commit/4de2fd06f3641f864b7920b43e9d09d0125e5dee

But, I have my doubt if EntityUtil is enough.

> Add EntityRepository.getPrimaryKey(E entity)
> --------------------------------------------
>
>                 Key: DELTASPIKE-910
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-910
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: JPA-Module
>            Reporter: Xavier Dury
>            Assignee: Daniel Cunha (soro)
>            Priority: Trivial
>
> It would be nice to add a method to retrieve the primary key of an entity on 
> its {{EntityRepository}} (by using 
> {{entityManagerFactory.getPersistenceUnitUtil().getIdentifier(entity)}}).
> This would help implementing generic JSF {{DataModel}} based on 
> {{EntityRepository}}, especially for methods like {{getRowKey()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to