CQS pattern with Spring / Hibernate
<p>I'm developing a <code>Java</code>/<code>Spring</code>/<code>Hibernate</code> application that adheres to the <code>CQS</code> (<code>Query Command Separation</code>) pattern. <br></p>

<p>Put simply: <br></p>

<ul>
<li>our <code>domain model</code> is only used by <code>Commands</code> which describe some operation that needs to be done on the domain model;</li>
<li>all read operations are done by a <code>QueryService</code> that bypasses the <code>domain model</code> so it can optimise (using <code>projection</code>) each query on a use case basis.</li>
</ul>

<p><br> 
The domain model maps to <code>MySQL</code> database by using <code>Hibernate</code>. <br></p>

<p><em>I know there's a longrunning debate about separation between domain and persistence model. However, I'm convinced that nowadays Hibernate has become so flexible that you don't have to make hard sacrificies on the domain model. This way, you don't get a one-to-one mapping between domain and persistence model.
Additionally, all DB-related stuff can be abstracted away by using Layer Supertypes.</em></p>

<p><br>
My questions: </p>

<ol>
<li>If I use <code>Hibernate</code> <code>Query</code> (or <code>Criteria</code>) using projection in my <code>QueryService</code>, I'm in fact using my domain model instead of plain SQL. <strong>Isn't this a breach against the <code>CQS</code> pattern...?</strong></li>
<li>I could opt for using plain SQL in my <code>QueryService</code>. Is there any good SQL framework out there that gives me the possibility to <strong>build Queries without using domain model AND easily binding results into JavaBeans</strong>? The results are typically graphs, so it would be nice to easily bind these to some nested JavaBean structure.</li>
</ol>