Development

#3112 ([PATCH] Fix for sfPropelActAsTaggableBehaviorPlugin's schema to allow `tagging.tag_id` to serve as foreign key reference to `tag.id`)

You must first sign up to be able to contribute.

Ticket #3112 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

[PATCH] Fix for sfPropelActAsTaggableBehaviorPlugin's schema to allow `tagging.tag_id` to serve as foreign key reference to `tag.id`

Reported by: prometheas Assigned to: xavier
Priority: minor Milestone:
Component: sfPropelActAsTaggablePlugin Version: 1.0.10
Keywords: Cc:
Qualification: Accepted

Description

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:

Change History

03/21/08 13:19:01 changed by xavier

  • status changed from new to closed.
  • resolution set to fixed.
  • qualification changed from Unreviewed to Accepted.

fixed in [8024]