Home Grails domain associations with cascading save enabled and transactions
Reply: 0

Grails domain associations with cascading save enabled and transactions

user598
1#
user598 Published in May 25, 2018, 6:51 pm

Say we have the following two domain classes:

class Book {
    static belongsTo = [author: Author]
}
class Author {
    static hasMany = [books: Book]
}

No if an Author is initialized with several books and Author.save() is called then the save cascades to Book and both Author and Book instances are saved into db.

However I can't find anywhere in documentation if the mentioned operation will be done transactionally or not.

Any idea?
Any resource to check ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307868 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO