fuel / orm

Fuel PHP Framework - Fuel v1.x ORM
http://fuelphp.com/docs/packages/orm/intro.html
151 stars 95 forks source link

Extended hasmany and manymany "get" method by handling "limit" condition #377

Closed feldsam closed 9 years ago

feldsam commented 9 years ago

Signed-off-by: Kristián Feldsam feldsam@gmail.com

emlynwest commented 9 years ago

Looks ok but could you also add documentation for this over at https://github.com/fuel/docs please?

WanWizard commented 9 years ago

This the docs also need a big warning: this means results from this relation might be incomplete due to the limit, and this can have implications because the parent object is cached.

Before accepting this PR, we have to make sure that if you define two indentical relations, one with limit, one without, and you fetch the one with the limit first, the other one still produces the correct results (and I fear not).

emlynwest commented 9 years ago

Ah right, I had somehow forgotten about the caching.

feldsam commented 9 years ago

Hi, when you use already implemented where condition them you also get different result set. So?

WanWizard commented 9 years ago

As said, if it doesn't interfere, it's not a problem. Just needs a check, to make sure there are no compatibility issues created.

feldsam commented 9 years ago

I think that, if where condition doesn't interfere then limit condition doesn't interfere too.

WanWizard commented 9 years ago

As Morpheus said to Neo: "Don't think you are, know you are". ;-)