Doctrine 1
  1. Doctrine 1
  2. DC-956

Validation error (unique) when inserting an object with Searchable behavior

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Searchable
    • Labels:
      None
    • Environment:
      Ubuntu Linux with Apache 2 and PHP 5.3.

      Description

      As soon as one enables the Searchable behavior like the following it is not possible anymore to create or update an entity.

      public function setTableDefinition()

      Unknown macro: { $this->setTableName('seartest_article'); $this->hasColumn('articleid', 'integer', 11, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, 'unsigned' => true, 'notnull' => false, 'unique' => true, 'length' => 11 ) ); $this->hasColumn('title', 'string', 255, array( 'type' => 'string', 'notnull' => false, 'length' => 255 ) ); $this->hasColumn('description', 'string', null, array( 'type' => 'string', 'notnull' => false, 'length' => null ) ); $this->option('type', 'INNODB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); }

      public function setUp()

      Unknown macro: { // Search support $search = new Doctrine_Template_Searchable(array( 'fields' => array('title', 'description'), 'batchUpdate' => false ) ); $this->actAs($search); $this->addListener(new SearchableTest_Model_ArticleListener()); }

      After trying to create a new item the following error message appears (note the record class is called SearchableTest_Model_Article and the primary id column is named articleid):

      Validation failed in class SearchableTest_Model_ArticleIndex 1 field had validation error: * 1 validator failed on articleid (unique)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Axel Guckelsberger
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: