Google Groups Home
Help | Sign in
Fixing ticket #936...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Brice Figureau  
View profile
 More options 5 May, 09:07
From: Brice Figureau <brice+doctr...@daysofwonder.com>
Date: Mon, 05 May 2008 10:07:27 +0200
Local: Mon 5 May 2008 09:07
Subject: Fixing ticket #936...
Hi,

As I needed the plugin/template child feature for one of my project, I
tried to fix #936 this week-end (see patch joined to the ticket entry).

It seems to work fine for the moment, but I encountered a strange issue
when
generating the sql (through mysql exporter).
For the wiki example of the documentation (or the Plugin_Testcase), I
get the following sql for the WikiTranslation table:

ALTER TABLE wiki_translation ADD FOREIGN KEY (id, lang) REFERENCES wiki_translation_version(id, lang);
ALTER TABLE wiki_translation ADD FOREIGN KEY (id, lang) REFERENCES wiki_translation_index(id, lang);
ALTER TABLE wiki_translation_version ADD FOREIGN KEY (id, lang) REFERENCES wiki_translation(id, lang) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE wiki_translation_index ADD FOREIGN KEY (id, lang) REFERENCES wiki_translation(id, lang) ON UPDATE CASCADE ON DELETE CASCADE;

The last 2 alter tables are OK (created by each child of i18n plugin), but the first 2 are plain wrong.
Those first 2 are coming from the
Doctrine_Record_Generator::buildForeignKeys that is called from
Doctrine_Record_Generator::initialize for the i18n plugin.

So the question is: what is the purpose of Doctrine_Record_Generator::buildForeignKeys?
Reading the source code of buildForeignKeys, I don't understand what it is doing?
Especially when some plugins are calling buildForeighKeys by themselves
(like i18n), I don't see the point of calling this function for every
plugin that initialize.

Any idea on how to fix that?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google