Is Cascade Atomic?

23 views
Skip to first unread message

Jay Park

unread,
Nov 7, 2012, 7:49:18 AM11/7/12
to eb...@googlegroups.com
Hi guys, 

I'd like to ask you experts a question about JPA annotation cascade? I'm using Ebean though. 

For example,
@OneToOne(cascade = CascadeType.ALL)

Does cascade mean that parent & child update at the same time without any concurrent issue (atomically), right?

Thanks in advance. 

Cheers,
Jay

Marcos Pereira

unread,
Nov 8, 2012, 6:58:02 AM11/8/12
to eb...@googlegroups.com
They are for sure different sql inserts/updates/deletes, but I don't know if Ebean uses a transaction to do cascades.

HTH

edge

unread,
Nov 8, 2012, 7:58:31 AM11/8/12
to eb...@googlegroups.com
I'm pretty sure Ebean always executes any cascades in a transaction - why don't you try it out?
Reply all
Reply to author
Forward
0 new messages