简体   繁体   中英

Grails and DAO layer concept

I'm using grails with GORM.

I'm kinda confused with grails : I can't find simple example where it's explained how to reuse queries via a DAO layer.

Is the concept of dao layer not present in grails ? How to reuse queries between services ? What is the best practice in grails ? Named queries ? Or else ?

Check out Grails Best Practises :

Domain

  1. To reuse common partial queries or decompose the complex logic, use named queries and chain them together as required, just like one commonly chains jQuery function calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM