Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion #1708: I18n and versionable, searchable can't work together
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
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Doctrine  
View profile   Translate to Translated (View Original)
 More options 2 Dec 2008, 02:24
From: "Doctrine" <no-re...@phpdoctrine.org>
Date: Tue, 02 Dec 2008 02:24:27 -0000
Local: Tues 2 Dec 2008 02:24
Subject: [Doctrine] #1708: I18n and versionable, searchable can't work together
#1708: I18n and versionable, searchable can't work together
-----------------------------------+--------------------------------------- -
 Reporter:  superjavason           |       Owner:  jwage
     Type:  defect                 |      Status:  new  
 Priority:  major                  |   Milestone:      
Component:  I18n                   |     Version:  1.0.4
 Keywords:                         |    Has_test:  0    
 Mystatus:  Pending Core Response  |   Has_patch:  0    
-----------------------------------+--------------------------------------- -
 the same defect was described in ticket #1384 , #1619
 ----
 here is the issue,
 when we setup a schema like this,
 {{{
 Wiki:
   tableName: it_wikis
   actAs :
     I18n :
       fields : [title , content ]
       actAs :
         Versionable :
           fields : [title , content ]
         Searchable :
           fields : [title , content ]
         Sluggable :
           fields : [ title ]
   columns :
     title : string(255)
     content : string(10000
 }}}
 it's the same as [[BR]]
 http://www.doctrine-project.org/documentation/manual/1_0/en/behaviors
 #nesting-plugins[[BR]]
 ----
 this problem maybe caused by the wrong constrains generated by Doctrine,
 take a look at the generated sql
 {{{
 CREATE TABLE wiki_translation_version (id BIGINT, lang CHAR(2), title
 VARCHAR(255), content TEXT, version BIGINT, PRIMARY KEY(id, lang,
 version)) ENGINE = INNODB;
 CREATE TABLE wiki_translation_index (id BIGINT, lang CHAR(2), keyword
 VARCHAR(200), field VARCHAR(50), position BIGINT, PRIMARY KEY(id, lang,
 keyword, field, position)) ENGINE = INNODB;
 CREATE TABLE wiki_translation (id BIGINT, title VARCHAR(255), content
 TEXT, lang CHAR(2), version BIGINT, slug VARCHAR(255), UNIQUE INDEX
 sluggable_idx (slug), PRIMARY KEY(id, lang)) ENGINE = INNODB;
 CREATE TABLE it_wikis (id BIGINT AUTO_INCREMENT, PRIMARY KEY(id)) ENGINE =
 INNODB;
 ALTER TABLE wiki_translation_version ADD FOREIGN KEY (id) REFERENCES
 wiki_translation(id) ON UPDATE CASCADE ON DELETE CASCADE;
 ALTER TABLE wiki_translation_index ADD FOREIGN KEY (id) REFERENCES
 wiki_translation(id) ON UPDATE CASCADE ON DELETE CASCADE;
 ALTER TABLE wiki_translation ADD FOREIGN KEY (id) REFERENCES
 wiki_translation_version(id);
 ALTER TABLE wiki_translation ADD FOREIGN KEY (id) REFERENCES
 wiki_translation_index(id);
 ALTER TABLE wiki_translation ADD FOREIGN KEY (id) REFERENCES it_wikis(id)
 ON UPDATE CASCADE ON DELETE CASCADE;
 }}}

 the last two constrains but one are unnecessarily and were conflicted with
 the ones above.

--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1708>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper


    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.

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