[symfony-users] Unable to Update Propel Many-to-Many relationships with multi-column PK

2009-12-11 Thread steady
I have an object ApplicationProfile which represents a many-to-many
object:


  
  
  
  

  
  

  



When making modifications to an ApplicationProfile object which
already exists in the db I'm having trouble saving this object. While
I can save modifications to is_confirmed, I'm unable to modify either
of columns which are used as the primary key.

This appears to be due to how the Propel generated
ApplicationProfilePeer doUpdate method works. It uses the primary key
to retrieve the records to update however if you've modified the pk
(in this example say you modified one of the columns which make up the
profile_id) then it is unable to find the correct column to modify.

public static function doUpdate($values, PropelPDO $con = null)
[...]
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/
primary key(s)
[...]

I'm wondering if this is due to a configuration issue... eg. the
doUpdate method gets generated differently when the schema.xml is
properly configured. Or if doUpdate simply can't/doesn't support this
sort of modification.

At the moment the only way to get around this issue appears to be to
add a separate single column primary key to the lookup table.
(pk_application_profile, application_id, profile_id) Another option
would perhaps be to modify doUpdate however it unclear how you would
provide it the unmodified value to use in retrieving the original
record.

Any suggestions?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: overriding sfFormField renderRow method

2009-09-09 Thread steady

I am hoping to accomplish something similar to what is discussed in
this ticket:
http://trac.symfony-project.org/ticket/5838

I thinking of passing a multidimensional array into renderRow() in the
attributes parameter. I could then pass one of the sub arrays to
renderField() and another to formatRow(). This multidimensional array
would contain html attributes for various html elements referenced in
my $rowFormat.


On Sep 9, 2:41 am, Bernhard Schussek  wrote:
> Hi,
>
> Unfortunately it is currently not possible to replace the class
> sfFormField with a custom implementation.
>
> What are you trying to achieve?
>
> Bernhard
> --
> Software Architect & Engineer
> Blog:http://webmozarts.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] overriding sfFormField renderRow method

2009-09-08 Thread steady

I'm wondering if there are any suggestions on how to cleanly override
sfFormField's renderRow method.

I'd like to extend some of the functionality within that method.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---