kohana / orm

Kohana ORM
159 stars 108 forks source link

minimize the numer of queries to database while checking permissions #43

Closed zbigniewmotyka closed 10 years ago

zbigniewmotyka commented 13 years ago

http://dev.kohanaframework.org/issues/4326

isaiahdw commented 13 years ago

This needs to be updated for the Kohana coding styles. See: http://kohanaframework.org/3.2/guide/kohana/conventions

Also I'm not sure selecting all the roles every time is a good idea. It seems like it would be better to just select the roles they requested, and cache those results. If they request a role that isn't in the cache you would do a lookup. I guess the way you have it makes sense though if the goal is to avoid extra database queries (remember duplicate queries can be cached anyway, so the overhead is low).

Kohana-Builds commented 13 years ago

Build Starting
http://ci.kohanaframework.org/job/kohana-3.2-pull/45/

Kohana-Builds commented 13 years ago

Build Failed
http://ci.kohanaframework.org/job/kohana-3.2-pull/45/

kiall commented 13 years ago

Apologies, Just restored CI server from backup .. Its not quite fixed yet ;) Ignore those last messages!

!build

Kohana-Builds commented 13 years ago

Build Starting
http://ci.kohanaframework.org/job/kohana-3.2-pull/46/

Kohana-Builds commented 13 years ago

Build Passed
http://ci.kohanaframework.org/job/kohana-3.2-pull/46/

kemo commented 10 years ago

I am not sure how I feel about this, especially since it's targeted for 3.2/develop. There are applications which heavily rely on roles and we might also be able to have instances of the same model using different databases in one of the next releases. Closing this 'for now' because of the target version and conventions (conditions inside of conditions with terminating commands).

I'll be glad to re-open it if there is interest.