Closed GoogleCodeExporter closed 9 years ago
Some Postgresql-related person must take care of this bug.
Original comment by ondrej.zara
on 23 Apr 2009 at 9:44
Where is this 'create foreign key' function in the code? Is it just a generic
'make
foreign key type same as primary'? The application is aware of which database
engine
is being used, since it uses the proper set of data types. Could there be an <<
IF
(engine is pgsql and primary type is serial) MAKE foreign key integer ELSE make
foreign key same as primary >> ?
The issue concerns Postgres users, but is an application issue.
Point me in the right direction and I may give it a go, but as a "jack of many
'languages' and master of none" it is difficult for me to grasp the overall
workings
of the application.
Cheers :-)
Original comment by i...@amarosia.com
on 23 Apr 2009 at 10:32
It is architecturally incorrect to make such database-specific adjustments in a
code
which is apriori DB agnostic.
On the other hand, I see that this could not be solved by means of
modifications of
Postgresql datatypes definition. I will try to make up some solution here.
Original comment by ondrej.zara
on 23 Apr 2009 at 11:27
I have implemented this functionality. The datatypes.xml's <type> tag now has
an optional fk attribute, which
names the foreign key's type when given type is a primary key. Thus it's
relatively DB agnostic. This functionality
can be added for any database that requires it, simply by modifying the
datatypes.xml file.
Original comment by ober.14@osu.edu
on 8 Nov 2009 at 8:34
Attachments:
Thanks for a patch, fixed in revision 60.
Original comment by ondrej.zara
on 10 Nov 2009 at 1:32
Original issue reported on code.google.com by
i...@amarosia.com
on 23 Apr 2009 at 2:25