ebean icon indicating copy to clipboard operation
ebean copied to clipboard

DDL constraint generation when table with schema

Open flagadajones opened this issue 12 years ago • 1 comments

Hi,

There is a bug in Foreignkey and index ddl generation.

I have a table like this :

@Table(name = "Abonnement" ,schema="DBHABLOT8USR")
public class Abonnement  extends Model{
....
}

and in the ddl i get this generation :

alter table DBHABLOT8USR.Abonnement add constraint fk_DBHABLOT8USR.Abonnement_num_1 foreign key  ....

and

create index ix_DBHABLOT8USR.Abonnement_num_1 on DBHABLOT8USR.Abonnement(PRR_NUM);

the FK name and IX name are bad fk_DBHABLOT8USR.Abonnement_num_1, ix_DBHABLOT8USR.Abonnement_num_1

the schemas fk_DBHABLOT8USR and ix_DBHABLOT8USR doesn't exists...

DBHABLOT8USR. The correct generation is : fk_DBHABLOT8USR.Abonnement_num_1 ==> DHABLOT8USR.fk_Abonnement_num_1 ix_DBHABLOT8USR.Abonnement_num_1 ==> DBHABLOT8USR.ix_Abonnement_num_1

Regards

flagadajones avatar Jun 04 '14 13:06 flagadajones

Fixed in 4.0.5

rbygrave avatar Jun 10 '14 09:06 rbygrave