From: Jacob Sparre Andersen <jacob@jacob-sparre.dk>
Subject: GNATColl ORM problem (foreign key twins)
Date: Wed, 30 Oct 2013 10:14:04 +0100
Date: 2013-10-30T10:14:04+01:00 [thread overview]
Message-ID: <87zjprp1cz.fsf@adaheads.sparre-andersen.dk> (raw)
I am spending some time studying and experimenting with the GNATColl
database interfacing facilities. GNATColl can generate a type-safe
database interface from a formal description of the tables, but in some
cases it generates un-compilable Ada packages.
I want to model a collection of categories and subcategories in a
database like this:
| TABLE | categories | category | | Item categorisations |
| name | Text | PK | | |
| TABLE | category_subsets | category_subset | | Item categorisations |
| superset | FK categories(name) | NOT NULL | | |
| subset | FK categories(name) | NOT NULL | | |
But this fails because GNATColl names the foreign key fields with the
referenced field name instead of with the referencing field name.
See <http://repositories.jacob-sparre.dk/gnatcoll-orm-foreign-key-twins>
for some of the variations I have tried.
Does any of you know enough about GNATColl (specifically
"gnatcoll_db2ada") to have an idea about how to fix the problem? (The
problem has been reported to AdaCore, but they don't have any customers
funding a fix.)
Greetings,
Jacob
--
Photo of the day:
http://billeder.sparre-andersen.dk/dagens/
next reply other threads:[~2013-10-30 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 9:14 Jacob Sparre Andersen [this message]
2013-10-30 12:43 ` GNATColl ORM problem (foreign key twins) Simon Wright
2013-10-30 17:48 ` Jacob Sparre Andersen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox