[Doctrine] #1708: I18n and versionable, searchable can't work together

2 views
Skip to first unread message

Doctrine

unread,
Dec 1, 2008, 9:24:27 PM12/1/08
to doctri...@googlegroups.com
#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

Doctrine

unread,
Dec 1, 2008, 9:45:59 PM12/1/08
to doctri...@googlegroups.com
#1708: I18n and versionable, searchable can't work together
-----------------------------------+----------------------------------------
Reporter: superjavason | Owner: jwage
Type: defect | Status: new
Priority: major | Milestone: 1.0.5
Component: I18n | Version: 1.0.4
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------
Changes (by jwage):

* milestone: => 1.0.5


--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1708#comment:1>

Reply all
Reply to author
Forward
0 new messages