Udi wrote:
> 
> Hey,
> I have this case:
> 
> class Book{
>      @id
>      protected long id;
>      private static number = 0;
> 
>      @prePersist
>      private void makeSomeID(){
>            id = ++number;
>      }
> }
> 
> class Persister{
>      public static void main(...){
>            while (true){
>                   em.persist(new Book());
>            }
>      }
> }
> 
> I don't know why I sometimes get EntityExistsException.
> The openJPA documentation says nothing about this exception. Why do I get
> it?
> 
> ps - I know it's not compiling, I just can't copy the code from the
> workspace...
> 
> thanks
> 
> Udi
> 

Are you cleaning your database out between each run?

-Rick

-- 
View this message in context: 
http://n2.nabble.com/EntityExistsException-issue-tp3377645p3393139.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to