Your cart
  • IMG
    {{cart_item.name}}
    {{cart_item.variation_attribute_name}}: {{cart_item.variation_attribute_label}}
    {{cart_item.item_unit}}: {{ setCurrency(cart_item.price)}}
    {{ setCurrency(cart_item.price*cart_item.quantity)}}
    Invalid quantity more than stock
Total :
{{setCurrency(cart.sub_total)}}

There is no item in the cart. If you want to buy, Please click here.

Step 2: Data insert manually

Complete Application using Grails 3

Created by :
Grails
tutorial
Programming, Software and application
1090
2020-10-14 16:12:27

To insert a row to the contact table, your code will look like this: 


def manualAdd(){



    for (int i; i<5; i++){

        Contact p = new Contact(

                firstName:'First name '+i,

                lastName:'Last Name '+i,

                email:'email'+i+'@gmail.com',

                city:'City '+i,

                country:'Country '+i,

                message:'message '+i

        ).save()

    }

    render "Added 5 data "



}


 

Notice that the domain instance itself knows how to persist itself. In usual Java frameworks, our Pojo and DAO code are separate. But in GORM, it seems they are merged together.