openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gokhan Ergul <>
Subject Re: Error instantiating named sequence "test.DataObjectsGenerator"
Date Mon, 17 Dec 2007 17:19:22 GMT
Miroslav Nachev wrote:
> I do not want to use lastInsertId or similar. I would like to use my 
> own Sequence generator. Can somebody show me one working example or 
> JUnit test with Custom Sequence generation using OpenJPA?
> Miro.

Well, the only database supported mechanism (for mysql) to create a 
custom sequence generator is last_insert_id. If you don't want to use 
that, you'll either end up inventing what TableGenerator already does, 
or you'll have to find a way to ensure unique sequence generation in a 
potentially distributed environment --not a trivial problem to solve.


View raw message