marius
I'm new here

Database METADATA - "Foreign Key" vs. "Create Index"

I created a First Spirit project which has one database schema (Oracle) with two tables:
parent(1) - (*)child    (1 to many relation).


When I designed the 1:N relation (Step 2) First Spirit displayed me the following information: "Name of relation: PARENT_CHILD_FK (only in database)"

...so far so good (I got this message as on the database METADATA there will be a foreign key constraint added)

After saving in First Spirit I was checking the METADATA of the two tables in Oracle. I was expecting that the METADATA of the Child table would contain meta-information of "CONSTRAINT ... FOREIGN KEY" - (like in the 3.x First Spirit version...please correct me if I'm wrong)...but this meta information is missing and the "CREATE INDEX" is used.

The METADATA information is very important in my case because I'm using reverse engineering for code generation.

Question: is this the way how First Spirit wanted to be (at database level - not to use FOREIGN KEY constraints)? Is this some how configurable - so the "FOREIGN KEY" will be used instead of "CREATE INDEX"?

Thanks,.

Marius

0 Kudos
10 Replies

Currently I have a 85% working version that work without modifying the FS generated schema / DDL (DB structure - PK, indexes, special FS fields).

I had to extend the following "Hibernate aspects" in order to be able to make it work with reverse engineering (related to the special FS_VAILD_* and FS_RELEASE_TO fields):

- the composite ids

- the relations: one-to-many (generating of "set" tags), many-to-one, one-to-one) settings

- general filtering on a DAO level (different filtering mechanism for released and current versions)

0 Kudos