{"action":"created","issue":{"url":"https://api.github.com/repos/propelorm/Propel2/issues/904","labels_url":"https://api.github.com/repos/propelorm/Propel2/issues/904/labels{/name}","comments_url":"https://api.github.com/repos/propelorm/Propel2/issues/904/comments","events_url":"https://api.github.com/repos/propelorm/Propel2/issues/904/events","html_url":"https://github.com/propelorm/Propel2/issues/904","id":63260806,"number":904,"title":"Wrong schema's name with archivable behavior","user":{"login":"pierregaste","id":530648,"avatar_url":"https://avatars.githubusercontent.com/u/530648?v=3","gravatar_id":"","url":"https://api.github.com/users/pierregaste","html_url":"https://github.com/pierregaste","followers_url":"https://api.github.com/users/pierregaste/followers","following_url":"https://api.github.com/users/pierregaste/following{/other_user}","gists_url":"https://api.github.com/users/pierregaste/gists{/gist_id}","starred_url":"https://api.github.com/users/pierregaste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierregaste/subscriptions","organizations_url":"https://api.github.com/users/pierregaste/orgs","repos_url":"https://api.github.com/users/pierregaste/repos","events_url":"https://api.github.com/users/pierregaste/events{/privacy}","received_events_url":"https://api.github.com/users/pierregaste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-20T16:38:32Z","updated_at":"2015-04-01T10:35:09Z","closed_at":null,"body":"Hi!\r\nI've tried to use the archivable behavior with two schemas: ```mySchema``` and ```archive```.\r\nHere my ```schema.xml```:\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<database name=\"default\" namespace=\"AppBundle\\Model\" defaultIdMethod=\"native\" schema=\"mySchema\">\r\n    <table name=\"user\">\r\n        <column name=\"id\" type=\"integer\" required=\"true\" primaryKey=\"true\" autoIncrement=\"true\"/>\r\n        <column name=\"name\" type=\"varchar\" size=\"140\" required=\"true\" primaryString=\"true\"/>\r\n        <behavior name=\"archivable\"/>\r\n    </table>\r\n</database>\r\n```\r\nWhen I'm execute the ```model:build``` command, I have this error:\r\n```\r\n [PDOException]                                                                                                                     \r\n  SQLSTATE[0A000]: Feature not supported: 7 ERROR:  cross-database references are not implemented: \"mySchema.mySchema.user_archive\" \r\n```\r\n\r\nI've tried to configure the behavior like this (without success ...):\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<database name=\"default\" namespace=\"AppBundle\\Model\" defaultIdMethod=\"native\" schema=\"mySchema\">\r\n    <table name=\"user\">\r\n        <column name=\"id\" type=\"integer\" required=\"true\" primaryKey=\"true\" autoIncrement=\"true\"/>\r\n        <column name=\"name\" type=\"varchar\" size=\"140\" required=\"true\" primaryString=\"true\"/>\r\n        <behavior name=\"archivable\">\r\n            <parameter name=\"archive_table\" value=\"archive.user\" />\r\n        </behavior>\r\n    </table>\r\n</database>\r\n```\r\n\r\nSame error : \r\n```\r\n[PDOException]                                                                                                            \r\n  SQLSTATE[0A000]: Feature not supported: 7 ERROR:  cross-database references are not implemented: \"mySchema.archive.user\"\r\n```\r\nDid I do something wrong?\r\nThanks for you help!"},"comment":{"url":"https://api.github.com/repos/propelorm/Propel2/issues/comments/88434202","html_url":"https://github.com/propelorm/Propel2/issues/904#issuecomment-88434202","issue_url":"https://api.github.com/repos/propelorm/Propel2/issues/904","id":88434202,"user":{"login":"ktounet","id":6919151,"avatar_url":"https://avatars.githubusercontent.com/u/6919151?v=3","gravatar_id":"","url":"https://api.github.com/users/ktounet","html_url":"https://github.com/ktounet","followers_url":"https://api.github.com/users/ktounet/followers","following_url":"https://api.github.com/users/ktounet/following{/other_user}","gists_url":"https://api.github.com/users/ktounet/gists{/gist_id}","starred_url":"https://api.github.com/users/ktounet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktounet/subscriptions","organizations_url":"https://api.github.com/users/ktounet/orgs","repos_url":"https://api.github.com/users/ktounet/repos","events_url":"https://api.github.com/users/ktounet/events{/privacy}","received_events_url":"https://api.github.com/users/ktounet/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T10:35:09Z","updated_at":"2015-04-01T10:35:09Z","body":"@pierregaste Your whole tables from \"default\" database are assigned to the schema \"mySchema\".\r\nCheck this :\r\nhttp://propelorm.org/documentation/cookbook/using-sql-schemas.html#assigning-a-table-to-a-schema\r\n\r\nIt is possible to solve your problem through a archive table declaration with schema attribute :\r\n```xml\r\n<database name=\"default\" namespace=\"AppBundle\\Model\" defaultIdMethod=\"native\">\r\n\r\n    <table name=\"user\" schema=\"customer\">\r\n        <column name=\"id\" type=\"integer\" required=\"true\" primaryKey=\"true\" autoIncrement=\"true\"/>\r\n        <column name=\"name\" type=\"varchar\" size=\"140\" required=\"true\" primaryString=\"true\"/>\r\n\r\n        <behavior name=\"archivable\">\r\n            <parameter name=\"archive_table\" value=\"archive.user\"/>\r\n        </behavior>\r\n    </table>\r\n\r\n    <table name=\"user\" phpName=\"UserArchive\" schema=\"archive\">\r\n        <column name=\"id\" type=\"integer\" required=\"true\" primaryKey=\"true\"/>\r\n        <column name=\"name\" type=\"varchar\" size=\"140\" required=\"true\" primaryString=\"true\"/>\r\n        \r\n        <column name=\"archived_at\" type=\"timestamp\" />\r\n    </table>\r\n\r\n</database>\r\n```\r\n\r\nHowever, this is a tedious way whether there is a lot of tables...\r\n\r\nIn my humble opinion it would be nice to add a schema parameter into the archivable behavior. This  shortcut means the archive table would be generated with a custom schema.\r\n@marcj What do you think about that ?"}}