Welcome Guest, Not a member yet? Register   Sign In
Poll: Entity models?
You do not have permission to vote in this poll.
yes
43.18%
19 43.18%
no
18.18%
8 18.18%
maybe
38.64%
17 38.64%
Total 44 vote(s) 100%
* You voted for this item. [Show Results]

Entity models?
#13

(This post was last modified: 06-12-2015, 07:41 AM by RWCH.)

(04-16-2015, 11:31 PM)jlp Wrote: What I was suggesting has nothing to do with ORM. It is just a way of having the existing model be able to use something other than stdClass. The "entity model" would represent one record in the returned result set, and could be whatever you want it to be. Properties would be injected into such an object the same way they are in a stdClass object in a result set, but we would then have a way to do something entity-specific with such objects.

So if I understand it right, you want the CodeIgniter DB classes be able to return specific objects (which you call "entiry models" here) and not just collections (read "arrays"). I guess that would be okay...

but the returned objects would be different from my domain objects, like the objects rerturned by mysql_fetch_object (standard PHP) are also different from my domain objects. Wouldn't that make your "enity models" DTO's (data transfer objects)?

If that is true, I still have to map them to my domain objects. In that case the value of using these kind of classes seems limited.

Or can I specify that the returned objects must be of the type of my domain object? That would be cool. Is that possible?

Do I understand it right and are my objections valid? Please explain what the benefits of entity models are ... and how they (could) work

Thanks
Reply


Messages In This Thread
Entity models? - by jlp - 04-11-2015, 08:41 AM
RE: Entity models? - by albert.freeman - 04-13-2015, 03:40 PM
RE: Entity models? - by RWCH - 04-14-2015, 05:17 AM
RE: Entity models? - by gadelat - 04-14-2015, 05:52 AM
RE: Entity models? - by dmyers - 04-14-2015, 05:56 AM
RE: Entity models? - by sv3tli0 - 04-14-2015, 06:23 AM
RE: Entity models? - by kilishan - 04-16-2015, 09:48 PM
RE: Entity models? - by jlp - 04-16-2015, 11:31 PM
RE: Entity models? - by RWCH - 06-12-2015, 07:36 AM
RE: Entity models? - by mwhitney - 06-15-2015, 08:41 AM
RE: Entity models? - by mwhitney - 04-17-2015, 08:53 AM
RE: Entity models? - by Razican - 04-19-2015, 02:59 PM
RE: Entity models? - by PaulD - 04-20-2015, 07:27 AM
RE: Entity models? - by kilishan - 06-09-2015, 12:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB