Propel-gen duplicate tables error on multiple database #468

natecj opened this Issue Sep 18, 2012 · 0 comments

1 participant


I am using the primary database for read/write access, but I also needed read-only access to another database at the same time. I am using external-schema tags to include the schema for each of these databases, with each included XML file having its own database tag. The problem is that I am getting an error about "duplicate tables" (there is a table called session in each database).

From what I have been able to debug by playing around with the Propel Generator code (for parsing the XML schema files) is that the database tags after the initial one in schema.xml are ignored. I think this should be a relatively simple fix since the XML processor should only need to create a new database object to add the respective tables, but I cant seem to figure out why its skipping only those (extra) tags.

Another related issue is that since the database tags are being ignored and every table is assumed to exist in the primary database, all of the Query classes that should be using the secondary database are defaulting to the primary (which then throws errors since the tables dont exist there). I can get around this issue by specifying the connection, but that is certainly not ideal since it should already know which connection to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment