Welcome Guest, Not a member yet? Register   Sign In
How to write models
#7

[eluser]papagno[/eluser]
Yes, I think that the ORM approach is what I need, but it's a library really necessary for this task?


EDIT: I'm trying DataMapper now and I think it's weird that to get (for example) all my posts I have to instantiate a Post and then call a method on the instance:
Code:
$post = new Post();
$posts = $post->get();

Do you know of any other library that use a different approach with ORM?


EDIT 2: I did a print_r of the $posts variable (2 rows with 3 attributes) and I got 1291 lines (within a pre tag)! Is that normal?


Messages In This Thread
How to write models - by El Forum - 02-11-2011, 10:08 AM
How to write models - by El Forum - 02-11-2011, 10:20 AM
How to write models - by El Forum - 02-11-2011, 10:22 AM
How to write models - by El Forum - 02-11-2011, 10:23 AM
How to write models - by El Forum - 02-11-2011, 10:44 AM
How to write models - by El Forum - 02-11-2011, 10:50 AM
How to write models - by El Forum - 02-11-2011, 11:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB