Ticket #1390 (closed defect: worksforme)

Opened 10 months ago

Last modified 10 months ago

Doctrine::getTable('table')->find(2) works different than $table->find(2)

Reported by: warden Owned by: jwage
Priority: minor Milestone:
Component: Attributes Version: 1.0.0
Severity: Keywords:
Cc: Has Test: yes
Status: Pending User Response Has Patch: no

Description

imho those two methods should do the same:

1) $record = new User(); $record->getTable()->find(5);

2) $record = Doctrine::getTable('User')->find(5);

1) doesn't work, and 2) does.

Change History

Changed 10 months ago by jwage

Hmm. Can you provide a little more information? Any errors occur? Do both issue queries to the database but is one of them wrong?

Changed 10 months ago by jwage

  • milestone changed from Unknown to 1.0.0-RC2

Changed 10 months ago by warden

no errors. in fact the record is fetched but it is like an object within an object, i.e. it is not accesible in a standard way. i'll try to show you a var_dump for both cases.

Changed 10 months ago by jwage

  • status changed from new to closed
  • mystatus changed from Pending Core Response to Pending User Response
  • resolution set to worksforme
  • has_test set

Added coverage in r4859

I wasn't able to produce the problem. Both worked as expected.

Changed 10 months ago by anonymous

  • milestone New deleted

Milestone New deleted

Note: See TracTickets for help on using tickets.