Ticket #81 (closed defect: invalid)

Opened 1 year ago

Last modified 2 months ago

Solar_Sql_Model::fetchOne() eager fetching is broken

Reported by: Antti Holvikari Assigned to: pmjones
Priority: major Component: code
Keywords: Cc:

Description

Line 1010 in Solar/Sql/Model.php (fetchOne()) has this:

$record->_data[$name] = $this->_fetchRelated($name, $opts['page']);

As you can see, it's calling _fetchRelated(), which calls _newRelatedSelect(). The problem is that _newRelatedSelect() needs $this->_data to be set so it can create a WHERE $this->_data[$optsnative_col?]. But within fetchOne() the _focus is 'master' and it doesn't have any $this->_data.

I couldn't come up with any solution.

Also, shouldn't it use $record->$name = ... instead for setting the data?

Attachments

Change History

05/03/08 15:50:03 changed by pmjones

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

The ticket is superseded by changes to how the model class functions; please re-open if I am closing it in error.


Add/Change #81 (Solar_Sql_Model::fetchOne() eager fetching is broken)




Action