openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <zlha...@gmail.com>
Subject [Bug]ID cannot generater correct while have Trigger
Date Thu, 26 Feb 2009 16:41:12 GMT
Hi OpneJpa

 

I think openjpa is good project.

 

But I found bug, Can you give some suggestion about this?

 

I use mssqlserver, 

And use @GeneratedValue(strategy = GenerationType.IDENTITY)

When I insert a record into Table A, 

and print the sql found OPENJPA will get ID from @@IDENTITY

But this table have a Trigger which use to insert a recode to one audit
table.

So what  @@IDENTITY is audit table's ID not the ID of A. 

 

Maybe can change it to ident_current('tablename').

 

Thank you very much.

 

Best Regards,

Benon Zhang

||| Software Developer

Aspen Technology, Inc. ||| +86 21 513 75045 ||| fax: +86 21 513 75050 |||
cell phone: +86 13482039398

 


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