propelorm / sfPropelORMPlugin

symfony 1.x plugin for Propel.
http://www.propelorm.org/
Other
109 stars 95 forks source link

Generated base classes missing BC methods #234

Closed Arkemlar closed 8 years ago

Arkemlar commented 8 years ago

I just updated old symfony project to latest sfPropelORMPlugin version (using composer way). After all I get stucked on heavily broken BC. Some methods was missed after I executed symfony propel:build --all-classes

  1. An old propel generator created reltion object getters like $this->getPageRelatedByParentId() Example: $items = ShopProduct2shopRubricPeer::doSelectJoinShopRubric($c); doSelectJoinShopRubric methods becomes undefined after base classes regeneration using new version.
  2. Also new generator missing some BasePeer methods, or at least missing this one: doSelectJoinAll()

I am wondering why? Here was noted that Propel 1.6 is a backwards compatible evolution of Propel 1.4 (the version bundled with symfony 1.3 and 1.4) but it's not! Or at least not working by default. How to make new version fully backward compatible?

Arkemlar commented 8 years ago

Well, my bad. The reason why methods were omitted is wrong schema.yml file which I revert enginered from database - it lost all relations mapping because tables in database are on MyISAM engine.

Btw I got FROM INNER JOIN (omitted table name in FROM). In stackoverflow I found an answer that Criteria is a bad way to make queries in propel 1.6, but I dont want to rewrite a tonn of ugly code from previous guy.. so will stay on old version. At least until this "FROM INNER JOIN" bug will be fixed.