If the admin generators and form generators have no concept of composite
primary keys then simple changing sfDoctrineRecord::getPrimaryKey() to
return the first array entry will fix the problem. I need someone to confirm
this for me first though.

- Jon

On Thu, May 8, 2008 at 12:47 PM, thomas.s <[EMAIL PROTECTED]> wrote:

>
>
>
> On May 8, 6:54 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> > Hmm. Do symfony admin and form generators not handle composite primary
> keys?
>
> In sfDoctrineFormGeneratedTemplate, line 116:
> $obj-><?php echo $relation->getLocalFieldName() ?> = $this->object-
> >getPrimaryKey();
>
> ex.: $groupUser->user_id = array('id' => 4711);
>
> This should result in an error, because user_id expects a string/int,
> or not?
> Maybe i am doing something wrong, but i just managed that my multiple
> selects with many-to-many relations are displaying with correctly
> initialized defaults (see http://trac.symfony-project.com/ticket/3500).
>
> I haven't checked the primary-key issue yet, that is part of the save
> action...
> Otherwise everything works.
>
>
> >
> > On Thu, May 8, 2008 at 11:49 AM, thomas.s <[EMAIL PROTECTED]> wrote:
> >
> > > On May 8, 5:39 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote:
> > > >http://svn.symfony-project.com/plugins/sfDoctrinePlugin/trunk/
> >
> > > > I have already ported everything from sfDoctrinePlugin for 1.0 to
> 1.1,
> > > and
> > > > ported all sfPropelPlugin 1.1 functionality too.
> >
> > > Thank you for your effort Jon.
> >
> > > > > Does anyone knows if the sfDoctrinePlugin is going to support SF
> 1.1?
> > > > > Is it going to have form generator either?
> >
> > > I'm using the trunk of sfDoctrinePlugin with Symfony 1.1 and noticed
> > > various Propel related statements in the form generator. My main
> > > concern are the calls to "$this->object->getPrimaryKey()", which
> > > returns always an array('id' => $pk). I think "current($this->object-
> > > >identifier())" solves this issue.
> >
> > > I also proposed a fix for another bug (see
> > >http://trac.symfony-project.com/ticket/3499)
> > > and i am now working through the generator files to remove the propel
> > > instructions.
> >
> > > Keep up the good work on this great ORM,
> >
> > > Thomas
> >
> > --
> > Jonathan Wagehttp://www.jwage.comhttp://www.centresource.com
> >
>


-- 
Jonathan Wage
http://www.jwage.com
http://www.centresource.com

--~--~---------~--~----~------------~-------~--~----~
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