Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Class user {
  2. static hasMany = [group:Team]
  3. }
  4.  
  5. class StudentProfile extends User {
  6. static hasMany = [lessons: Lesson]
  7. }
  8.  
  9. Class Lesson {
  10. static belongsTo=[ student: StudentProfile]
  11. }
  12.  
  13. def listGroup = Lesson.createCriteria().list{
  14.  
  15. projections {
  16. student{groupProperty('group')}}
  17. count()
  18. avg('scale')
  19. }
  20. [sectionExec:sectionExec]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement