Reputation: 9
I need to create grails domain class like this(see image),but I don't know how to do. Can someone please give me the solution,please?
Image : http://www.uppicweb.com/x/i/ib/6demo.jpg
Upvotes: 0
Views: 296
Reputation: 824
Also, if there is requirement that name of your id should be product_id, cart_id etc then you have to look at the documentation how to do that. Otherwise, in grails by default the id field name is id only.
Upvotes: 0
Reputation: 16875
It's quite simple. You need to create a domain class for each box in your picture. That means:
Take a look on GORM documentation.
Then you can create controllers with scaffolding and start to play.
Upvotes: 2
Reputation: 120138
From the picture, you don't need a single domain class. You need one for every box in your image. So you would have a 'Customer' domain object, 'ProductComment', 'Product', etc, and you would relate them via the techniques discussed in chapter 5 of the Grails documentaiton.
There should be plenty of information on the interwebs about this, you can start here:
Upvotes: 2