gorm - Grails : Retrieve all latest children records -


I'm new to Grails, I have a problem as described below.

I have 2 domain classes: Parents and children I am storing arrays of arrays in the database.

The parent category is:

  class guardian {is stable [large: child]}   

is a child class: class string string value is static = [parent: parent] static barriers = {time (empty: wrong) record (empty: incorrect) I now need: < P> I need to recover the baby's latest records, which contain several rows in the database with unique original ID . Example: Parents have the latest ID 7. There are approximately 10 records on Parent ID 7 in the hair table. I want to retrieve all these 10 records with the reference of parent ID (7).

Please type some help codes / queries.

gorm is a greate ORM You can use:

  def parent = parent.get (7) def hair list = hair. Find AllByParent (Parents); Read   

, it will help you to understand the gorm better.

Comments

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -