Hello, I need exactly same feature implemented.
I'm using TriggerAdapter to emulate a VIEW with support to insert/update/delete operations... But when you use JPA with it, @Generated annotation needs to know the SCOPE_IDENTIFIER() generated by trigger. I liked Rami solution, but, there is another way to set LastScopeIdentity inside a Trigger? Em sexta-feira, 22 de outubro de 2010 04:35:44 UTC-2, Thomas Mueller Graf escreveu: > > Hi, > > > What my distributed key does is that it guards the the uniqueness of the > distributed key. So statement insert into b values(13) would throw a unique > key violation exception. > > You can do that with triggers. Before an insert, check if the value > exists in another table. > > > small change set that I did that would allow trigger to set the > generated key > > So, as far as I understand, this is not needed to implement the above > feature. > > Regards, > Thomas > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
