openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Bauer <techhu...@gmail.com>
Subject Re: Issues with GeneratedValue and SequenceGenerator
Date Wed, 06 Apr 2011 15:57:20 GMT
IIRC, the identity value should be getting returned by the JDBC driver as a
result of the insert.  OpenJPA then populates the entity with that value.
What version of MySQL DB and JDBC driver are you using?

-Jeremy

On Wed, Apr 6, 2011 at 10:16 AM, realdepp <thepsycho@freenet.de> wrote:

> Thanks, but that didn't solve the problem.
>
> EntityManager.refresh() has no effect, like expected.
>
> I'm not enhancing with an eclipse tool, I'm calling the java program via
> ant:
>
>
>
>
>
>
>
>
>
>
> (I also tried the ant task, doesn't seem to make a difference)
>
> However, I get a bunch of warning messages: (I thought ignoring would be ok
> since I get no errors like "class not enhanced")
> openjpa.MetaData - Meta class "x.y.z.TimeSettings_" for entity class
> x.y.z.TimeSettings can not be registered with following exception
> "java.security.PrivilegedActionException: java.lang.ClassNotFoundException:
> x.y.z.TimeSettings_"
>
> I haven't checked yet if the warning message appears for every class, but
> most of them produce it.
>
>
> But I have to correct myself: initialValue AND allocationSize are ignored.
> The IDs start with 1 and they get increased by 50 (default value?) with
> every new persisted entity.
> (And, of course, I don't see any way to get the ids into the application)
>
>
> Is that probably related to MySQL?
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Issues-with-GeneratedValue-and-SequenceGenerator-tp6244055p6246413.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message