Quote:
Originally Posted by Tony Marston
PHP Code:
$query = "SELECT $select_str FROM $from_str $where_str $group_str $having_str $sort_str $limit_str";
I know your code snippet may be just that, an example, and therefore not complete and I've probably missed how you do this in the course of the discussion, or it may not even be covered in this discussion, but is it possible using the technique you have developed to generate SQL with JOINs? Around 90% of the queries in the application I maintain have a couple of JOINs and around 5% have conditional logic inside the query, such as IFs and CASEs. If this is a requirement can it be fulfilled using your technique?
Quote:
Originally Posted by Tony Marston
I do not recognise this concept called "bleeding upwards", so I ignore it.
Maybe ask for someone to elaborate then? ;)
Quote:
Originally Posted by Tony Marston
I do not need a separate dataMapper to go with each business object as I successfully combine the two into a single class/object. This keeps all the informaton about an entity (including information on its data structure) in a single class which is what encapsulation is supposed to be about.
So perhaps the crux is it seems some people think an entity should not contain information on its data structure, whereas you believe it should.
I don't think (excuse me if I'm speaking out of place here) those who believe it should not contain it, say that what you're doing isn't "encapsulation". I don't think that's the argument against your idea, although they may not agree with your expansion of the term encapsulation to cover that as well.
They think that the entity should not contain the data structure information EVEN if it does not use it itself, the even being the key point.
I feel Swiss I'm trying to be so neutral :p
Off Topic:
Is it just me or at a cursory glance do the :faq1: smilies look like they say "fag!"?