cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <>
Subject RE: [RT] Direct Form->SQL mapping through OJB and DynaBeans
Date Fri, 31 Oct 2003 16:09:43 GMT
Marc Portier <> writes:

> > 
> > Writing a SQL binding for forms seems a complicated beast 
> to me (maybe
> > I'm wrong as I'm not very fluent in SQL), so I was thinking 
> of using 
> > tools that would to the dirty work for me.
> > 
> I have been thinking about the direct sql mapping on and off, the 
> biggest problem I was able to identify (not solve) is that sql is not 
> 'symmetric' in its load and save operations (while woody binding is)
> with symmetric I mean for doing updates or inserts you can't 
> just give a 
> resultset back to the JDBC connection...

Well, you can if your JDBC drivers support it.  In particular, look at
sql.ResultSet.CONCUR_UPDATABLE (and the updateXYZ methods) which lets
you make a record set updatable so that you can edit directly and the
send it back to the database.  This requires JDBC 1.2. However, I know
you really don't want to keep a resultSet open across a Web transaction
and I believe this feature requires that the retrieve/update all occur
within the same SQL transaction so I believe that rules it out....

View raw message