struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Watrous" <dwatr...@hotmail.com>
Subject Re: Hibernate object relational mapping
Date Thu, 10 Feb 2005 16:32:16 GMT
Hibernate 3 (now in beta) will support stored procedures.  I think they may 
even be available in the current 2.x branch.

DW

----- Original Message ----- 
From: "Brian McGovern" <bmcgovern@imediainc.com>
To: "Struts Users Mailing List" <user@struts.apache.org>; "Soaring Eagle" 
<comfortable.numb@gmail.com>
Sent: Thursday, February 10, 2005 9:19 AM
Subject: RE: Hibernate object relational mapping


That was my question.  From what i understand hibernate uses sql statements 
not stored procs.  And i assumed that even though it was more coding on my 
part, that using stored procs and JDBC i could achieve faster db 
interaction.

But we all know what happens when we assume.. haha


-----Original Message-----
From: Soaring Eagle [mailto:comfortable.numb@gmail.com]
Sent: Thursday, February 10, 2005 11:10 AM
To: Struts Users Mailing List
Subject: Re: Hibernate object relational mapping


why would app speed be threatened? is it a big threat (like 50 %
downgrade or 10% downgrade?). Whats the problem with stored
procedures? I thought they were better than pure java.


On Thu, 10 Feb 2005 10:40:52 -0500, Brian McGovern
<bmcgovern@imediainc.com> wrote:
> Don't get me wrong, i wasn't knocking it. But my main concern is app speed 
> difference using stored procs or hibernate.
>
> -----Original Message-----
> From: Lee Harrington [mailto:leebase@gmail.com]
> Sent: Thursday, February 10, 2005 10:10 AM
> To: Struts Users Mailing List
> Subject: Re: Hibernate object relational mapping
>
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message