Ticket Details

Avoid unnecessary calls to cast()

RFC Ticket (closed)

###What happened:

When working with big Mongo documents (or many small ones) calls to $model->connection()->cast() become really expensive, plus they are many times unnecessary, since many times the fields are simple strings

###What was expected:

cast() is used only when it actually makes a difference

###Patch

Here is one way how this could be achieved, although it makes some really simple assumptions:

http://dev.lithify.me/forks/edmunc/lithium/commits/view/cfb8a80df92b1cbf2b61b00348aa485c2b07953f
on 05.12.11 reported by: edmunc owned by: edmunc

Updates

(duplicate) on 05.12.11 by edmunc
  • owner was changed to edmunc
  • status was changed to closed
  • resolution was changed to duplicate