Development

#6754 (sfDoctrineGenerator::getColumnGetter in sf 1.2.7)

You must first sign up to be able to contribute.

Ticket #6754 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

sfDoctrineGenerator::getColumnGetter in sf 1.2.7

Reported by: benlumley Assigned to: Jonathan.Wage
Priority: minor Milestone:
Component: sfDoctrinePlugin Version: 1.2.7
Keywords: Cc:
Qualification: Unreviewed

Description

Hi,

I just upgraded a project from 1.2.5 to 1.2.7, and in doing so, broke some admin generator modules.

Error traced to sfDoctrineGenerator::getColumnGetter.

See this extract from a generator.yml file (I am using sfDoctrineGuardPlugin):

    config:
      actions: ~
      fields:
        sfGuardUser: { label: Username }
        created_at: { label: Register Date }
      list:
        title: Player Management
        display: [=id, =sfGuardUser, =name, =email, =created_at, =approved]
        sort: [created_at, desc]
      filter:
        display: [name, club, email, nationality, approved]
      form:
        class:     BackendPlayerForm
      edit:
        title: Editing Player "%%name%%"

      new: 
        title: New Player

And the relationship from my schema.yml

  relations:
    sfGuardUser: { local: user_id, foreign: id, foreignType: one }

When passed "sfGuardUser" the version of this function in 1.2.5 returns "getsfGuardUser".

In 1.2.7 it returns getSfGuardUser (note the capital S). This results in a Doctrine_Record_Error.

Am I doing something wrong? Have i defined my relationships incorectly? Or is this a bug?

For others experiencing this error, this workaround in the Profile model works:

  public function getSfGuardUser() {
    return $this->_get('sfGuardUser');
  }

Change History

07/07/09 01:04:59 changed by Jonathan.Wage

  • status changed from new to assigned.

07/07/09 23:25:05 changed by Jonathan.Wage

  • status changed from assigned to closed.
  • resolution set to fixed.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.