Foreign key

Help is preferred to those who publish their work as Open Source and not as private branches rejecting collaboration. Such projects are not maintainable and shall be deleted.
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are grouped together. IF YOU HAVE REGISTERED, you need to send email to red1(a) with your username in the subject title to get me to activate you.

Foreign key

Postby nmicoud » Mon Oct 22, 2012 4:14 pm


How do you handle foreign keys ?
Do you create them when creating tables ? using a script (like generateForeignKeys.sql from stuff/script_to_generate_foreign_keys/) ?
In Compiere 3x, SynchronizeColumn process also generate FK.

What would be the best practice ?

Thanks and regards

Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: Foreign key

Postby globalqss » Tue Oct 23, 2012 1:28 am

Hi Nicolas,

Usually I use the generateForeignKeys.sql on stuff

That could be done automatically on synchronize column - but I'm not sure if that's a good idea - it's easy to create the foreign key, but not so easy to delete it if you change the references, I mean if you change the column type or the ref table.


Carlos Ruiz
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Foreign key

Postby nmicoud » Tue Oct 23, 2012 3:18 pm

Thanks Carlos
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Return to HELP ME!!!

Who is online

Users browsing this forum: No registered users and 3 guests