#1384: I18n and versionable together don't work
-----------------------------------+----------------------------------------
 Reporter:  mjekovec               |       Owner:  jwage  
     Type:  defect                 |      Status:  new    
 Priority:  major                  |   Milestone:  Unknown
Component:  Behaviors              |     Version:  1.0    
 Keywords:                         |    Has_test:  0      
 Mystatus:  Pending Core Response  |   Has_patch:  0      
-----------------------------------+----------------------------------------
 I18n and versionable

 I've tried to recreate WikiTest example from Behaviours section of the
 help, but I got reference integrity violation error when calling save() on
 the record.


 Yaml:

 {{{
     WikiTest:
       actAs:
         I18n:
           fields: [title, content]
           actAs:
             Versionable:
               fields: [title, content]
             Searchable:
               fields: [title, content]
             Sluggable:
               fields: [title]
       columns:
         title: string(255)
         content: string
 }}}


 Sample code:

 {{{
    $wiki = new WikiTest();
         $wiki->id = 1;
         $wiki->Translation['sl']->title = 'Naslov 1';
         $wiki->Translation['en']->title = 'Title 1';

         $wiki->Translation['sl']->content = 'Test 123';

         $wiki->Translation['en']->content = 'Test 123 ';
         $wiki->save();


 }}}


 I used innodb engine on mysql, which is probably the reason I got the
 error as myisam doesn't support reference checks. I debugged the code and
 found out that inserts happen in this order:

 - wikitest[[BR]]
 - wikitest_translation (here it fails, because a record should exist in
 wikitest_translation_version ???)[[BR]]


 Any ideas?

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1384>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to