Hi

I've a really strange problem with propel.
I'm writting a small forum for my new page, when I want to create a new topic, 
I save the topic, then create the inintial post and at last I update the 
topic to point to the first post.
But instead of updating the topic, propel creates a new one.

I've reduced the code to just this:

      $topic2 = stBoardTopicPeer::retrieveByPK(1);
      $topic2->setTitle("test");
      $topic2->save();

and it still creates a new topic instead of an update.
The same thing works as it should for the post object.

Schema.yml is:

  st_board_topic:
    _attributes:    { phpName: stBoardTopic }
    id:
    title:          { type: varchar(255), required: true }
    is_sticked:     { type: boolean }
    is_locked:      { type: boolean }
    forum_id:       { type: integer, foreignTable: st_board_forum, 
foreignReference: id, required: true, onDelete: cascade }
    created_at:
    updated_at:
    nb_posts:       { type: integer }
    nb_views:       { type: integer }
    latest_post_id: { type: integer, foreignTable: st_board_post, 
foreignReference: id, onDelete: setnull }
    user_id:        { type: integer, foreignTable: sf_guard_user_profile, 
foreignReference: user_id, onDelete: setnull }
    
  st_board_post:
    _attributes:    { phpName: stBoardPost }
    id:
    content:        { type: longvarchar, required: true }
    topic_id:       { type: integer, foreignTable: st_board_topic, 
foreignReference: id, required: true, onDelete: cascade }
    user_id:        { type: integer, foreignTable: sf_guard_user_profile, 
foreignReference: user_id, onDelete: setnull }
    created_at:
    updated_at:
    username:       { type: varchar(40) }
    forum_id:       { type: integer, foreignTable: st_board_forum, 
foreignReference: id, required: true, onDelete: cascade }

Has anyone an idea what the problem might be?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to