I'm submitting a fix to allow tagging.tag_id to be used as a proper foreign key reference.
Presently, the plugin's schema.yml file declares tagging.tag_id as varchar(100), which prevents its use as a foreign key reference. I found it useful to make use of:
- TaggingPeer::doSelectJoinTag( $c ) method, and
- Tagging::getTag()
neither of which Propel generator is able to generate under current declaration.
Fix (in diff format):
Index: plugins/sfPropelActAsTaggableBehaviorPlugin/config/schema.yml
===================================================================
--- plugins/sfPropelActAsTaggableBehaviorPlugin/config/schema.yml (revision 116)
+++ plugins/sfPropelActAsTaggableBehaviorPlugin/config/schema.yml (working copy)
@@ -17,7 +17,7 @@
tagging:
_attributes: { phpName: Tagging, package: plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model }
id: { phpName: ID, type: integer, required: true, primaryKey: true, autoincrement: true }
- tag_id: varchar(100)
+ tag_id:
taggable_model: varchar(30)
taggable_id: integer
_indexes: