I was used to work with Zend Db Table Relationships with MySQL. I declared $_dependentTables
and $_referenceMap
in the table classes as described in the manual. Then was able to work with functions findDependentRowset()
, findParentRow()
etc.
Now I use PostgreSQL, which is able to define the relations (REFERENCES) between tables right in the database.
The manual states:
Skip declaration of $_dependentTables if you use referential integrity constraints in the RDBMS server to implement cascading operations
what should be the case of Postgres. Despite this, I am not able to get it working. Unless I declare the referenceMap (but this shouldn't be needed!), I am still getting error:
No reference from table ... to table ...
The question is - is it possible to use references declared in Postgres in Zend Db, without (re-)declaring them in referenceMap? How - does ZF load it from Postgres to the referenceMap? If so, why I am getting the error?
ON UPDATE
andON DELETE
not the relationships themseleves. click the link in "See this chapter for more information" Either way it's not really clear what the issues are.