FREE Delivery in the UK.
In stock.
Dispatched from and sold by Amazon. Gift-wrap available.
Grails Persistence with G... has been added to your Basket

Dispatch to:
To see addresses, please
Please enter a valid UK postcode.
+ £2.80 UK delivery
Used: Very Good | Details
Sold by owlsmart_usa
Condition: Used: Very Good
Comment: Pages are clean and free of writing and or highlighting. Cover edges show some wear from reading and storage.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Grails Persistence with GORM and GSQL Paperback – 28 Apr 2009

3.5 out of 5 stars 2 customer reviews

See all 3 formats and editions Hide other formats and editions
Amazon Price
New from Used from
"Please retry"
£21.31 £4.06
Note: This item is eligible for click and collect. Details
Pick up your parcel at a time and place that suits you.
  • Choose from over 13,000 locations across the UK
  • Prime members get unlimited deliveries at no additional cost
How to order to an Amazon Pickup Location?
  1. Find your preferred location and add it to your address book
  2. Dispatch to this address when you check out
Learn more
£23.99 FREE Delivery in the UK. In stock. Dispatched from and sold by Amazon. Gift-wrap available.
click to open popover

Special offers and product promotions

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone

To get the free app, enter your mobile phone number.

Product details

  • Paperback: 156 pages
  • Publisher: Apress; 1st ed. edition (28 April 2009)
  • Language: English
  • ISBN-10: 1430219262
  • ISBN-13: 978-1430219262
  • Product Dimensions: 19.1 x 0.9 x 23.5 cm
  • Average Customer Review: 3.5 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Bestsellers Rank: 3,590,856 in Books (See Top 100 in Books)
  • If you are a seller for this product, would you like to suggest updates through seller support?

  • See Complete Table of Contents

Product description

About the Author

Robert Fischer is an independent contractor specializing in web application development and technical leadership. He is a regular presenter at conferences on the topic of Groovy and Grails, development best practices, and functional programming. He also is a regular contributor to open source in many languages, with his key contributions being the JConch library for Java concurrency, a plugin for Grails for background thread processing, and a plugin for Grails for automatic database updating. He resides in Durham, North Carolina, with his wife.

Customer reviews

3.5 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See both customer reviews
Share your thoughts with other customers

Top customer reviews

Format: Paperback
This book has some some five star content in places.
I've picked up a few new Groovy tricks to add to my coding repertoire and I'd recommend this book for that alone.
The book demonstrated things with extensive use of Assert statements which was good.

But there are a few things that irked me and hence the loss of a couple of stars (points 5-7 lose a star and points 8 & 9 causes loss of a second).
1) Comments showing artifact names weren't in some other font or bold or in italics to show a clear deliniation between artifacts in an individual listing.
2) P25 Luke Daley's Injecto library. The link seems to have stopped working at the time I write this.
I looked on the Wayback machine and found it was also used in GLDAPO. Then I exchanged Tweets with Luke & he tells me the @mixin annotation have replaced this.
Guiilliame LaForge covers @mixin this in the Groovymag April 2009 issue (What's new in Groovy 1.6) and Craig Wickesser gave an example in Dec 2009 issue (Groovy MetaObject Programming).
3) P27 1-30 should be 1-32
4) P130.
- Firstly, it seems there are a couple of lines missing here to declare the Testing class and a comment to signify where the artifact is along with its name.
- Secondly the author quotes parameter mapping for Dates as not working in Grails Controllers. So statements like:
def foo = new Foo(params)
def foo = new Foo() = params
wouldn't work for Dates.

I investigated this a bit more and I think this was as a result of the test the author was performing not a Grails problem per se!
ie Date.toString() doesn't give a date in a format that the underlying Spring binding understands!
Read more ›
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback Verified Purchase
I found this book via a link in a blog. I was able to download it straight away using the magic of Kindle and, while I appreciate this Amazon magic rather than book magic, it did make me approach the book with a positive mood).

I read the whole thing over a weekend. This is unheard for for me - there's normally something I find too dry that I start hopping around and subsequently only really "use" a fraction of a book - nothing wrong in that of course.

For me this book was ideal. I've been using Grails for a while on a personal project but was aware I didn't know how to do much beyond using the "findBy*" methods. I've used Hibernate before but find that a bit abstract at times.

The book introduced the various ways of getting "stuff" from the DB - from GORM to SQL and it gave a quick overview of the caches and how to use Grails cache directives. These tips alone justified getting the book for me.

Chris Ward
If I want more detail I now at least know what to go and look for.

I liked it. For me it did exactly what it said on the tin.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Helpful Customer Reviews on (beta) (May include reviews from Early Reviewer Rewards Program) 3.5 out of 5 stars 14 reviews
4 of 4 people found the following review helpful
3.0 out of 5 stars Good reference for Grails persistence 6 May 2009
By Trevor Burnham - Published on
Format: Paperback Verified Purchase
This is a good, quick guide to persistence in Grails. It follows a good pattern: Here's some short code, here's an explanation, and here's an integration test to cover the details. At times, this style is too quick, sketching over details and leaving me without a complete understanding.

The book doesn't talk about setting up your Grails environment. It's clearly aimed at people who already know how to use Grails but want a more thorough understanding of how to use their domain objects. All of this information is online, of course, but as the author points out a couple of times, the official documentation has always contained some inaccuracies. So this book is a good supplement. Is it a good read? Not really. It doesn't use an example project. It doesn't tell you how to built a better database. It assumes you know what you want to do and tells you how to do it. I mean that in the best possible way: Despite the popularity of Grails, info on best practices remains hard to find, and the source code in this book is very sleek, well-tested and Grails-y.

Whereas every Grails developer absolutely must have The Definitive Guide to Grails, Second Edition, which covers GORM pretty well, this book is good for reference. Not, however, in its slim, oversized-text print edition, which, as a FirstPress book, doesn't even have an index. I'd recommend it as an eBook only.
2.0 out of 5 stars Disappointed - but greatful for Fischer's contributions 18 Jun. 2010
By Parsh McHydrogenated - Published on
Format: Paperback Verified Purchase
LARGE TYPE which with my eye sight is good but the book is thin to start with. It's like writing your 4rd grade homework and the teacher asked for 5 pages so you write big.

Not sure if Apress or the Author was just lazy or if they really consider this a worthy book. If you look on the Roadmap on the back of the definitive guide they show this as the next book on the roadmap.

REALLY DISAPPOINTED. The book is basicly the test cases for validating GORM, rudimentary. It's as if, and I am almost certain this is the fact, APRESS solicited books and Robert Fischer went to the john and pinched off a couple of chapters.

I really needed a deeper project focused book with more involved queries. Granted, I am looking for a solution to a problem and the answer either does not exist or I have yet to soak up the light.

The book title should really say 'Basic Validation of' Grails Persistence with GORM and GSQL.

Here's what I was looking for and you won't find it in this book, I was able to hack this out given MarkMail messages. Many of which Fischer contributed to...I appreciate his contribution to the Grails project I just wish Apress & Fischer would have taken more time, payed him a stipend to create a more advanced book, especially given this is one of the only books specifically for GORM, GSQL.

I hope someone finds this constructive.

Really the issue is learning the ins, outs of the Hibernate Builder, which I am still trying to understand.

Could not get the formatting to stick. So,indents are removed.
calling routine
....Other processing to setup the query.....
.... Html page multi select dropdown request user input for columns to display i.e. "projections"
.... Html page for each column input box this becomes the "columnsmap"
.... user can enter multi strings in input box to filter a search in the OR part of query
.... value= split of input box\
.... This is Powerful dynamic stuff.

params.max = Math.min(params.max ? params.max.toInteger() : 10, 100)

def klmQueryTotal = Klm.createCriteria().count(defaultKlmQuery)

results = Klm.createCriteria().list(defaultKlmQuery)

println "count=$klmQueryTotal"
println "results.size()=$results.size()"
// results.each
// { println "results=$it" }

[ paramsList:params, columnList:columnsmap.keySet(), resultList:results, klmQueryTotal:klmQueryTotal ]
// columnsmap is a map of the columns to include and assoc. string to use as a where condition.

def defaultKlmQuery =
println "Hello projections - $params"

println "projections{"
println " property($key)"
println "AND1"
// where customerName like 'gil%' or customerName like 'for%'
// and siteName like 'atl%' or sitName like 'aust%'

{key,value ->
println "$key,$value size="+ value.size()
println "join ="+value.join().size()

if (value.join().size() != 0)
// OR the _id Elements of KLM
case 'customer':
case 'site':
case 'serviceInfo':
case 'mtu':
case 'config':
case 'software':
case 'salesOrder':
println "OR $key like $value"
{searchkey ->
println "Or $key{ ilike('${usecolumn[key]}','$searchkey') }"
"$key"{ ilike(usecolumn[key], "%${searchkey.trim()}%") }

// AND the KLM elements
case 'sn':
case 'soNumber':
//for each in list if value is a list
{searchkey ->
println "And $key{ ilike('${usecolumn[key]}','$searchkey') }"

if ( params.useMax == true)
if (params?.offset)

// sqlRestriction "distinct sn"
// sqlRestriction "sn in select * from klm where sn='2'"
// addToCriteria('select distinct sn from klm')
// addToCriteria(Restrictions.sqlRestriction('sn in (select distinct sn from klm where user_tbx is null)'))

1.0 out of 5 stars Lacks substance, would not recommend owning a copy 7 April 2011
By SerKa - Published on
Format: Paperback Verified Purchase
If you can find this in a library or borrow it, it's certainly worth reading through. It might take all of an hour and a half. With the large font size, there's really not much content. It feels like 40 pages of content in a more standard font size.

On the positive side, the ideas were organized and the writing is clear.

On the negative side, there is no depth to any of the topics. Aside from collecting all persistence-related topics together, there's nothing this book provides that the latest Grails User Guide doesn't provide better.

I don't know what audience this book is for. Perhaps for someone who wants a quick survey over GORM, but doesn't actually need to develop. If you're a developer, either Beginning Groovy and Grails: From Novice to Professional (Beginning from Novice to Professional) or The Definitive Guide to Grails are far better books for your library and both touch on everything contained in this one.
3 of 3 people found the following review helpful
4.0 out of 5 stars Handy Reference for GORM 7 May 2009
By G. Dickens - Published on
Format: Paperback Verified Purchase
At first I was surprised that it was a total of 156 pages (I was pleased that I didn't have to work my way through yet another 700 page book).

As the title indicates this is focused on one of the greatest assets of Grails, GORM. When working with GORM, you really need examples and options to help you with common data query and dataset organization tasks, this book provides that.

In a nutshell, if you are working on a Grails project, this book will provide you with a concise reference with great code examples of valuable GORM features that you will refer back to.
5.0 out of 5 stars Excellent treatment of GORM and very helpful 5 April 2010
By Burt Prior - Published on
Format: Paperback Verified Purchase
This is an excellent and worthwhile purchase for the beginning and intermediate Grails developer. I especially liked the 'test-driven' style used to prove his assertions on how GORM actually works.
If I do have a criticism, it's that its too short. I might suggest extended examples, especially with Criteria Builder and associations, and a good set of solutions to 'gotcha's using GORM. The 'gotcha's would be easy to find on the grails user list.
All in all, a must have for any grails/gorm developer. I'm hoping there's a 2nd edition on the way soon.
Thanks Robert for the excellent resource.
Burt Prior
Were these reviews helpful? Let us know