Ticket #49 (closed defect: wontfix)

Opened 6 years ago

Last modified 6 years ago

$additional_conditions in the find_one_has_many

Reported by: drfindley@… Owned by: anonymous
Priority: high Milestone: 1.0
Component: Active Record Version: 0.11.0
Severity: major Keywords:
Cc:

Description

$additional_conditions in the find_one_has_many and find_one_belongs_to is stored within the function, but then nothing is done with them.

$additional_conditions adds the conditions, only if the key is non-numeric.

Here is some sample fixed code:

$conditions = (is_numeric($foreign_key_value) ?

"{$foreign_key} = {$foreign_key_value}" : "{$foreign_key} = '{$foreign_key_value}'") . $additional_conditions;

Attachments

active_record.diff (1.8 KB) - added by drfindley@… 6 years ago.
Patch that fixes the issue

Change History

Changed 6 years ago by drfindley@…

Patch that fixes the issue

Changed 6 years ago by openface

This may be same as ticket #53

Changed 6 years ago by openface

Yes, this ticket should be combined with #53.

Changed 6 years ago by john

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

Changed 6 years ago by john

  • severity changed from normal to major
  • cc katherine@… removed
  • component changed from Scaffolding to Active Record
  • summary changed from Bill to $additional_conditions in the find_one_has_many
  • priority changed from highest to high
  • keywords trqobertfaa removed
  • type changed from spam to defect
Note: See TracTickets for help on using tickets.