Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Foo(id: 1234, name: "My Foo").save()
- def foo = new Foo()
- foo.id = 1234
- foo.name = "My Foo"
- foo.save()
- class Foo {
- String name
- static mapping = {
- id generator:'assigned'
- }
- }
- class Foo {
- short code /* new field */
- String name
- static constraints = {
- code(unique: true)
- name()
- }
- }
Add Comment
Please, Sign In to add comment