Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table person (id bigint),
- version bigint not null,
- primary key (id))
- create table address (id bigint),
- person_id bigint not null,
- primary key (id))
- class Person{
- static hasMany = [
- addresses: Address
- ]
- }
- class Address{
- Address address
- }
- class Person{
- static hasMany = [addresses: Address]
- }
- class Address{
- static belongsTo = [person : Person]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement