Is grails scaffolding a transaction in any way?

I looked at the source code Controller.groovy, and it looks like CRUD operations are not transactional (at least explicitly).

If I am right, does this mean that dynamic scaffolding should not be used in production as it is? Is there a way to make a transaction (i.e. can I change Controller.groovyor something else?)?

+5
source share
1 answer

You are right, scaffolding is not transactional. Perhaps this is because grails and hibernate servers support data sources that do not support transactions, such as MySQL MyISAM.

You can modify the transaction as follows:

  • run grails install-templates
  • Edit src/templates/scaffolding/Controller.groovy

Grails generate-controller , .

+3

All Articles