Development

#2822 ([PATCH] sfFormPropel does not respect Propel inheritance)

You must first sign up to be able to contribute.

Ticket #2822 (closed defect: fixed)

Opened 11 months ago

Last modified 9 months ago

[PATCH] sfFormPropel does not respect Propel inheritance

Reported by: jesse Assigned to: fabien
Priority: major Milestone: 1.1.0
Component: form Version: 1.1.0 DEV
Keywords: sfPropelForm, form, peer Cc:
Qualification: Unreviewed

Description

sfFormPropel makes incorrect assumptions about Propel models which don't hold up when creating forms for models which inherit from other models using the inheritance elements in schema.xml

I've included a patch which corrects these assumptions and enables sfFormPropel to work with subclassed models. The two assumptions I've found are:

  • At line 50, the class checks to see if $this->object's class name matches the return of $this->getModelName(). If that fails, it should also check if $this->object is a subclass of $this->getModelName().
  • At line 71, the peer should be retrieved by $this->object->getPeer().

Attachments

sfFormPropel.class.php.subclass.patch (0.6 kB) - added by jesse on 01/22/08 08:54:58.
sfPropelForm patch against r7141 to use methods that are friendly to models using inheritance.

Change History

01/22/08 08:54:58 changed by jesse

  • attachment sfFormPropel.class.php.subclass.patch added.

sfPropelForm patch against r7141 to use methods that are friendly to models using inheritance.

01/22/08 12:45:48 changed by fabien

  • milestone set to 1.1.0.

03/12/08 23:36:32 changed by fabien

in r7845

03/12/08 23:36:36 changed by fabien

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