Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3695950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:40:47+00:00 2026-05-19T04:40:47+00:00

Besides the obvious performance implications of doing so, what are good technical reasons not

  • 0

Besides the obvious performance implications of doing so, what are good technical reasons not to set grails.gorm.autoFlush = true and grails.gorm.failOnError = true in Config.groovy?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:40:47+00:00Added an answer on May 19, 2026 at 4:40 am

    GORM is a wrapper around Hibernate (at least that’s one of the implementations – there are now also various NoSQL implementations like Redis). By setting autoFlush to true you’re denying Hibernate the opportunity to optimise the calls it makes to the database. For example, you may cause it to insert then later update, when a single insert might have been sufficient. There’s nothing inherently bad about that, it’s just not necessary and is less efficient. Hibernate is clever enough to know when it needs to write to the database and can optimise – you’ve abstracted away that problem.

    Setting failOnError would cause save to throw an exception whenever you try to save a domain object that doesn’t validate. When building an application which involves creating objects from user input it’s pretty normal for objects not to validate – missing inputs, wrong formats, etc. Exception handling should be saved for exceptions and errors – it shouldn’t be used for normal flow of an application. save() returns the object when the object was successfully saved or null otherwise, which gives you a more convenient way to handle validation as part of the application flow, rather than putting try-catch blocks all over the place.

    Peter Ledbrook (on of the authors of Grails in Action) has written a great series of ‘GORM Gotchas’ articles in which he discusses some of these issues in more detail – well worth a read: part 1, part 2 & part 3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really suck at Rails' finders besides the most obvious. I always resort to
Besides the sample applications featured in the books Beginning Groovy and Grails and The
Besides the obvious differences between JavaScript and Java, what are the relevant differences in
Besides the obvious answer of buy an iphone 4 (I'm in Australia so that's
Besides the obvious 'admin' and 'blog' use cases for a module structure in Zend
Besides the obvious (one is a type, the other a class)? What should be
Besides the obvious case of treating different exceptions differently, is there any benefit in
Besides the obvious differences: Use enumerateObjectsUsingBlock when you need both the index and the
Besides the obvious fact that there's no sidebar in Windows 7, are there any
Besides the obvious reason of storing any type as an object and storing it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.