<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: SQLAlchemy for Java</title>
	<atom:link href="http://www.elharo.com/blog/software-development/java/2007/06/28/sqlalchemy-for-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.elharo.com/blog/software-development/java/2007/06/28/sqlalchemy-for-java/</link>
	<description>Ranting and Raving</description>
	<pubDate>Tue, 02 Dec 2008 19:41:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: F. Degenaar</title>
		<link>http://www.elharo.com/blog/software-development/java/2007/06/28/sqlalchemy-for-java/#comment-92415</link>
		<dc:creator>F. Degenaar</dc:creator>
		<pubDate>Fri, 29 Jun 2007 14:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/software-development/2007/06/28/sqlalchemy-for-java/#comment-92415</guid>
		<description>The support for native queries has improved a lot since Hibernate 3. It is really no problem to map a read-only object to a query. A lot of examples can be found here: http://www.hibernate.org/hib_docs/v3/reference/en/html/querysql.html.

On the other hand the join-element allows it to map an object  that crosses multiple tables.  We did that a lot, because we had objects with some properties being subject to auditing and some properties being not. So we split up the object in one table with additional auditing information and one table without. We created a view (leaving out the auditing information) for the first table and some instead-of-triggers to make the view look &lt;b&gt;and&lt;/b&gt; feel like a table. In the class-mapping, we sat dynamic-update and dynamic-insert to true. That in turn makes sure, that the view or the join-table only get updated if their respective properties were changed.
In SQL you end up writing a lot of joins when you query those objects. In HQL you look at objects, hence Hibernate writes the joins for you.
As to provide for later optimization we put all our queries into the mapping files. By doing so we could replace HQL-queries transparently with SQL-queries optimized for the RDBMS in use.
The only thing we stumbled upon was locking. If you lock such an object only the record in the master table gets locked rather than all the records in all the tables belonging to the object.</description>
		<content:encoded><![CDATA[<p>The support for native queries has improved a lot since Hibernate 3. It is really no problem to map a read-only object to a query. A lot of examples can be found here: <a href="http://www.hibernate.org/hib_docs/v3/reference/en/html/querysql.html" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.hibernate.org');" rel="nofollow">http://www.hibernate.org/hib_docs/v3/reference/en/html/querysql.html</a>.</p>
<p>On the other hand the join-element allows it to map an object  that crosses multiple tables.  We did that a lot, because we had objects with some properties being subject to auditing and some properties being not. So we split up the object in one table with additional auditing information and one table without. We created a view (leaving out the auditing information) for the first table and some instead-of-triggers to make the view look <b>and</b> feel like a table. In the class-mapping, we sat dynamic-update and dynamic-insert to true. That in turn makes sure, that the view or the join-table only get updated if their respective properties were changed.<br />
In SQL you end up writing a lot of joins when you query those objects. In HQL you look at objects, hence Hibernate writes the joins for you.<br />
As to provide for later optimization we put all our queries into the mapping files. By doing so we could replace HQL-queries transparently with SQL-queries optimized for the RDBMS in use.<br />
The only thing we stumbled upon was locking. If you lock such an object only the record in the master table gets locked rather than all the records in all the tables belonging to the object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carey Evans</title>
		<link>http://www.elharo.com/blog/software-development/java/2007/06/28/sqlalchemy-for-java/#comment-92244</link>
		<dc:creator>Carey Evans</dc:creator>
		<pubDate>Thu, 28 Jun 2007 21:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/software-development/2007/06/28/sqlalchemy-for-java/#comment-92244</guid>
		<description>JPA implementations support populating Java objects from columns in multiple “secondary tables”, like your simple example. But they’re still going to write the SQL for you.

If you want to write your own SQL and populate existing Java objects from columns in the ResultSet, I think you’re looking for iBATIS.</description>
		<content:encoded><![CDATA[<p>JPA implementations support populating Java objects from columns in multiple “secondary tables”, like your simple example. But they’re still going to write the SQL for you.</p>
<p>If you want to write your own SQL and populate existing Java objects from columns in the ResultSet, I think you’re looking for iBATIS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Cowan</title>
		<link>http://www.elharo.com/blog/software-development/java/2007/06/28/sqlalchemy-for-java/#comment-92225</link>
		<dc:creator>John Cowan</dc:creator>
		<pubDate>Thu, 28 Jun 2007 20:11:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.elharo.com/blog/software-development/2007/06/28/sqlalchemy-for-java/#comment-92225</guid>
		<description>SQLAlchemy is what I'd call a first-order embedding of SQL in a OOP language (as opposed to things like JDBC which are a zeroth-order embedding).  Hibernate and friends are just persistent objects, not access to SQL stores.  I applaud its development and hope someone comes up with a static (i.e. Java) version soon.</description>
		<content:encoded><![CDATA[<p>SQLAlchemy is what I&#8217;d call a first-order embedding of SQL in a OOP language (as opposed to things like JDBC which are a zeroth-order embedding).  Hibernate and friends are just persistent objects, not access to SQL stores.  I applaud its development and hope someone comes up with a static (i.e. Java) version soon.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
