Skip to content

ariman01/simple-read-only-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

action: Person.get(params.id) and then properties = params

controller: no annotation
action: @Transactional(readOnly = true)
service: not called
behaviour: ajax changes not saved

controller: no annotation
action: @Transactional(readOnly = true)
service: def transactional = false (method just println)
behaviour: ajax changes not saved

controller: no annotation
action: @Transactional(readOnly = true)
service: no def transactional = false (method just println)
behaviour: ajax changes not saved

controller: no annotation
action: @Transactional(readOnly = true)
service: no def transactional = false (method gets person object and updates name)
behaviour: ajax changes saved (change to age from the screen and also name updated in service)

controller: no annotation
action: @Transactional(readOnly = true)
service: def transactional = false (method gets person object and updates name)
behaviour: ajax changes saved (change to age from the screen and also name updated in service)

controller: no annotation
action: @Transactional(readOnly = true)
service: def transactional = false (method saves a new book)
behaviour: ajax changes saved and book inserted

controller: no annotation
action: @Transactional(readOnly = true)
service: def transactional = false (method saves a new book in a withTransaction block)
behaviour: ajax changes saved and book inserted

controller: no annotation
action: @Transactional(readOnly = true)
service: def transactional = false (method saves a new book in a withNewTransaction block)
behaviour: ajax changes not saved and book inserted

controller: no annotation
action: @Transactional(readOnly = true)
service: def transactional = false (method gets person with person's argument id and updates the obtained object's name)
behaviour: ajax changes not saved (age not updated in db even tho changed on the screen) but name updated

controller: no annotation
action: @Transactional(readOnly = true)
service: no def transactional = false (method gets person with person's argument id and updates the obtained object's name)
behaviour: ajax changes not saved (age not updated in db even tho changed on the screen) but name updated

About

Playing with Grails transactions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Groovy 59.0%
  • CSS 29.2%
  • Batchfile 11.4%
  • JavaScript 0.4%