2
votes

Am using Symfony 1.4 and Propel 1.6. I have a table representing an object where one may record may relate to one other record in the table (Think outbound / inbound routes). The key of second half of the pair (think inbound route) is stored in the first instance (the outbound one).

This project is in development. I am trying to make a data dump. What happens is that I do not get all of the records output from MySQL. Only where the self-referencing column is NULL will I get an output.

How do I tell propel to output the integer value stored in this linked column?

Note: table not actually called Route, this just a placeholder name for the real-world object (does not model links or routing object or invoke such naming issues)

Route:

id: ~
linked_Route_id: 
  type: INTEGER
  foreignTable: Route
  foreignReference: id
  onDelete: setnull
  fkSkipSql: true  #I have tried builds with and without this option.

..... Thanks for any recommendations from someone who has had to work around the issue before.

1
More information is needed. Are you using mysqldump to dump your data? Could you provide some example data and explain a little more how your process?Lloyd Moore

1 Answers

0
votes

I think you cannot achieve what you want and it's more related to the Propel plugin for symfony than Propel itself. The data dump/load tasks have a specific process for symfony, so you won't get raw data but more in a symfony compliant formatting.

You may be able to get what you want by using the Propel command line: http://www.propelorm.org/cookbook/working-with-existing-databases.html#dumping_data_to_xml but it can be not perfect.

You could use the mysqldump command otherwise.