jonathangeiger / kohana-jelly

See the link below for the most up-to-date code
https://github.com/creatoro/jelly
MIT License
146 stars 34 forks source link

Multiple with error #157

Open misterx opened 14 years ago

misterx commented 14 years ago

When relation name difference of table name, we have error in Jelly::alias();. Example: I used your models from jelly-test, and change relation "role", to "action" in User model.

'action' => new Field_BelongsTo(array(
            'default' => 0,
            'foreign' => 'role'
        )),

Then:

Jelly::select('author')->with('action')->limit(1)->execute(); //This working fine;

But this:

Jelly::select('post')->with('author:action')->limit(1)->execute(); //Have error, cose Jelly find "action" as model.
banks commented 14 years ago

thanks for the report

lobster-tm commented 14 years ago

Find error, http://github.com/jonathangeiger/kohana-jelly/commit/60ef40c1003fc34799519a2a2ccb7681e24d9e29#comments

last comment

misterx commented 14 years ago

thanks, but this don't work in belongsto =(