openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C N Davies" <...@cndavies.com>
Subject RE: Virtual Entity
Date Thu, 24 Jun 2010 13:10:45 GMT
Yes it does have an @id but I have a base entity that creates them
automagically (Base64 representation of the current system time), so it is
sort of like generated value type. My getters martial the data to the
virtual field is retuned in the structure I expect and I guess you could do
the same thing with setters if you wanted.

Chris

-----Original Message-----
From: Daryl Stultz [mailto:daryl.stultz@opentempo.com] 
Sent: Thursday, 24 June 2010 10:59 PM
To: users@openjpa.apache.org
Subject: Re: Virtual Entity

On Thu, Jun 24, 2010 at 8:33 AM, C N Davies <cnd@cndavies.com> wrote:

> I have virtual entity that has nothing but getters, if you do it his way
> you
> can use JPQL referring to the virtual fields and let OpenJPA do the work
> for
> you.
>

So your virtual entity has no @Id? Or you are using a bogus property as the
id? Does "nothing but getters" imply read-only and JPA treats it
differently? I actually imagined not putting getters or setters in it.

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
http://www.opentempo.com
mailto:daryl.stultz@opentempo.com


Mime
View raw message