I use hibernate...it's not a "tool for those who don't know sql" -- as
I've been a database developer for 20+ years.

It's a tool for those who:
1.  don't want to have to write a lot of redundant code just to
insert, update, delete
2. don't want to have to hand code "class.property =
recordset.getField("fieldName")" out the yin yang
3.  don't want to have to hand code different data layers for
different database systems

Consider on form submit....

You could write:

sqlStr = "insert into mytable (field1, field2.....field15') values (" +
form.field1 + ",'" +
form.field2 + "','" +
.....
form.field15 + "')"

and write your own handling of database errors

or  could write:

// copy form variable to an instance of your data class
BeanUtils.copyProperties(metric,dynaForm);

// Call to "persist" (save) the record
MetricService.getInstance().makePersistent(metric);

And there are MANY more reasons to use Hibernate over handcoding your
own sql.  None of it having to do with "not having to know sql".

Lee

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to