OK, I cobbled together a small test case which appears to demonstrate the question. SQL:
- Code: Select all
-- Created by dia2sql.pl v1.2-5ntb1 (Wed Mar 10 10:25:25 EST 2004)
--
-- Table structure for table 'parent'
--
CREATE TABLE parent (
id INTEGER NOT NULL NOT NULL,
details CHAR(10),
PRIMARY KEY(id)
) TYPE=INNODB;
--
-- Table structure for table 'child1'
--
CREATE TABLE child1 (
id INTEGER NOT NULL NOT NULL,
parent_id INTEGER NOT NULL,
details VARCHAR(10),
PRIMARY KEY(id),
INDEX parent_id_idx (parent_id),
FOREIGN KEY (parent_id) REFERENCES parent (id)
) TYPE=INNODB;
--
-- Table structure for table 'child2'
--
CREATE TABLE child2 (
id INTEGER NOT NULL NOT NULL,
parent_id INTEGER NOT NULL,
details VARCHAR(10),
PRIMARY KEY(id),
INDEX parent_id_idx (parent_id),
FOREIGN KEY (parent_id) REFERENCES parent (id)
) TYPE=INNODB;
MySQL consumed the above into a new database without complaint.
In developer, created a DB server connection to this database to this DB and a new solution; selected relations and the database under "Database defined relations" and then create pondered and came forth with (only) "db_parent_to_child1" - which looks just fine, but rather lonely.
This is with Servoy 1.2(final), Java 1.4.2_03 on Linux, MySQL Connector/J 3.0.11.
Given the recent fix, I'm not concerned that the "parent_to_child2" relation didn't appear.
But, shouldn't this have created a "child1_to_parent" relation too? Or have I missed something here?
Hopefully I can re-test with Servoy 2.0rc<latest> soon.
Thanks,
Neale.