Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ivanarrizabalaga/9640198 to your computer and use it in GitHub Desktop.
Save ivanarrizabalaga/9640198 to your computer and use it in GitHub Desktop.
1-1 grails relationship: child+parent
/**
Target
Promocion
Promocion
Target
**/
create table target (
id bigint generated by default as identity,
version bigint not null,
descripcion varchar(255),
nombre varchar(255) not null,
promocion_id bigint, primary key (id));
create table promocion (
id bigint generated by default as identity,
version bigint not null,
nombre varchar(255) not null,
target_id bigint, primary key (id));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment