Welcome Guest, Not a member yet? Register   Sign In
DataMapper ORM Question...
#1

[eluser]jordanarseno[/eluser]
Hey everyone.

Before I begin, massive thanks to everyone involved with the DM ORM package, it's going to save me a lot of time while coding, and will also allow for a much more readable codebase.

When using the get() or get_iterated() methods in DM, the result contains a huge amount of data, including the simple result set. A var_dump() or print_r() on the object after a successful get() or get_iterated() will show tonnes of extra details regarding the object.

I don't need all of this excess data, and in fact, it's causing me problems because of the kind of structure that my views are expecting; When information is pushed to a view, I ensure it is sent as an array of objects, this helps my designers with the templating engine.

I can see at the bottom of the huge result set that the actual database data is indeed an array of objects, but there's so much other data above it.

I need to either restrict the results, or extract the actual database results from this hugely populated object and then hand it to the view.

I could, in theory, map each field to a separate object, group them in an array and pass them into the view, but this seems like overhead.

Any ideas?

Cheers and Thanks,

JoAr


Messages In This Thread
DataMapper ORM Question... - by El Forum - 03-07-2011, 12:59 AM
DataMapper ORM Question... - by El Forum - 03-07-2011, 03:37 AM
DataMapper ORM Question... - by El Forum - 03-07-2011, 02:21 PM
DataMapper ORM Question... - by El Forum - 03-07-2011, 03:01 PM
DataMapper ORM Question... - by El Forum - 03-07-2011, 03:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB