users@jpa-spec.java.net

[jpa-spec users] Re: Enhancement: EntityManager.find() method that takes an ID and a version?

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Tue, 1 Jul 2014 07:46:52 -0700

On Thu, Jun 26, 2014 at 9:20 AM, Kevin Sutter <sutter_at_us.ibm.com> wrote:

> I think your second "goal" hits the issue on the head:
> > 2. Except in the case of DIY merges, I don't think there's another
> > case in all of JPA where you have to do something with the version
> > yourself as a programmer.
>
>
> This is specific to DIY merges. All of the rest of the version processing
> is hidden from the user, but in the case of DIY merging, users are now
> required to understand how to access and process the version columns. Now
> I understand what you were driving at. I do like the idea of maybe
> enhancing the getReference() instead of the find(). And, since the
> EntityNotFoundException already exists on the getReference, I would propose
> that we stick with that vs the check for null.
>
> In any case, I can see the benefit of this idea, now we just need Linda to
> pipe in... :-)


OK; should I file an issue? I assume so. I didn't want to clutter up the
works until folks thought this might be a valid use case.

Best,
Laird