On Sun, 02 May 2010 08:34:59 +0200 Tobias Schlitt <e...@schlitt.info> wrote:
Hi Toby, I see, it's the DatabaseSchema Component not supporting relations. Perhaps it would be a good idea to specify this in the docs somewhere. But perhaps I did not read carefully enough. Thanks, Norbert > Norbert, > > On 05/02/2010 12:34 AM, Wagner, Norbert E. wrote: > > Hello, > > I was trying to generate my PersistentObject definitions from a > > MySQL database. The saved successfully to php array with > > DatabaseSchema. Those arrays do contain the relations: > > array ( > > 'zsp_tbl_assigneddiscount' => > > ... > > 'zsp_tbl_sgndscnt_fk_Id_client' => > > ezcDbSchemaIndex::__set_state(array( > > 'indexFields' => > > array ( > > 'id_client' => > > ezcDbSchemaIndexField::__set_state(array( > > 'sorting' => NULL, > > )), > > ), > > 'primary' => false, > > 'unique' => false, > > )), > > this does not reflect the actual relation, but only the foreign key > field. The component does not know about real relations between > tables, yet. > > > But the persistent definitions do not. > > Is this intended or do I miss something. > > Right, due to the above fact, the relation information needed for > PersistentObject is not generated. > > Would be cool to enhance DatabaseSchema to know about fk-relations at > some point. Then the genertaed PersistentObject definitions could also > gain profit from this information. > > Volunteers always welcome. :) > > Regards, > Toby -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components