Doctrine exception during set of foreign keys 
gilles
/ 26. Okt 2010 / 07:02 ![]()
Hi !
Thanks for this beautiful tool.
I've generated a new design of an zikula module but during the installation process of the module this error is generated and block the installation :
Doctrine Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dhcpgenerator.z_dg_network' doesn't exist. Failing Query: "ALTER TABLE z_dg_network ADD Constraint z_dg_network_nid_z_dg_hostdb_hid FOREIGN KEY (nid) REFERENCES z_dg_hostdb(hid)". Failing Query: ALTER TABLE z_dg_network ADD CONSTRAINT z_dg_network_nid_z_dg_hostdb_hid FOREIGN KEY (nid) REFERENCES z_dg_hostdb(hid)
http://pastebin.com/4t93GW7E dhcpgenerator.mostapp
http://pastebin.com/G75zmUBq dhcpgenerator.mostdiagram
I've created 2 relations "one to many" between my 3 tables and it seems to come from here... Did I have miss something ?
Optionen
Rating
Antworten
-
gilles / 26. Okt 2010 / 07:03

http://pastebin.com/4t93GW7E dhcpgenerator.mostapp
http://pastebin.com/G75zmUBq dhcpgenerator.mostdiagram
Axel / 26. Okt 2010 / 09:18


Hi Gilles,
thank you for having a look at the modeling approach.
I suggest you to try removing the manually added id fields (like hid and rid). They are added then automatically before the generator starts.
For this case the relations source and target field references should point to id. You can assign a custom alias for both sides if desired.
Another small hint: you can start all field names with lower cases - not required though.
Hope that helps
Axel
How to set up relations
- 8 Antworten
- Axel on 15. Mai 2012 - 18:04
Neue Umfragen
Was soll in Zukunft verbessert werden?
