mediaslave/phrails

ORM

mediaslave opened this issue · 1 comments

There is an ORM bug.

When creating multiple models in a row. The last one is what all queries will be performed on:

$job = new Job(); //model
$employee = new Employee(); //model
$job->find(2);
$employee->find(5);

The orm will try to find the employee with id 2 and it will try to find the employee with the id 5

Simple solution, until the bug is looked at:

$job = new Job();
$job->find(2);
$employee = new Employee();
$employee->find(5);

This works.

Done.