I'm writing a chapter on Struts for a book, Professional JSP 2.0, from
Wrox (http://www.wrox.com/books/1861008325.htm). This chapter includes
information on Hibernate. The reason I'm sending this post is to verify
the following statement:
Hibernate: Hibernate is a powerful, ultra-high performanc
So is it possible to get a parent w/ children and only make a call to
update(parent)? From your e-mail below, I gathered that I could change
my storeObject() method to use update() rather than saveOrUpdate() and
everything would work peachy-keen. Nope, I still get the same error -
so obviously th
I just tried it (co and build) and it seemed to work fine here at home. I had
issues yesterday at work though. Maybe something to do with getting the
source through the web ui. I'll try again today once Gavin hooks me up with
the composite-id patch.
Thanks,
Matt
> Matt Raib
> If there's someone else using Hibernate under Tomcat (Matt?) or other
> containers, I'd like to ask whether you're using the container's pooling
> implementation or Hibernate's and why.
I'm using Tomcat's (v4.1.18) DBCP and it seems to work just fine. I've been
told that I'm doing my sessions
Gavin,
In response to your comment on my weblog - seem comments below...
> unsaved-value="null" makes no sense for composite-ids or any other kind of
> "assigned" id. Thats because the identifier property is *never* null when
> Hibernate gets to it.
>
> Now, I'm assuming that what you *reall
I sent the e-mail below to Gavin last night, but I might as well send it
to the group to see if anyone else might be able to offer a tip or two.
---
I whipped up a quick example and was able to reproduce my problem on
MySQL (I was using Oracle today). It was easy to do in my appfuse
project, so I
I haven't written it yet, but I'm planning on it soon - just wanted to
get some ideas from the group. What do you think about creating a
ThreadLocal HibernateSession.java file at the persistence level - and
then wrapping it on each level (business layer, web layer) to create
sessions for that leve
I found that by removing the getPropertyList(int index) - the problem
was solved.
Thanks,
Matt
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Juozas Baliuka
> Sent: Thursday, January 16, 2003 11:29 AM
> To: Raible, Matt; [EMAIL PROTECTED]
> Su
If the "best practice" is to create a primary key class and go that
route - I'll do that. I just wanted to make sure I'm following the
recommended path ;)
Matt
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Konstantin Priblouda
> Sent: Wednesd
your online business a competitive advantage. Test-drive a Thawte SSL
> certificate - our easy online guide will show you how. Click here to get
> started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
> ___
> hibernate-devel ma
This might seem trivial, but it did trip me up a bit. It'd be nice if
you specified that batch files to run the Tools can be found in the
"bin" directory of the Hibernate download.
Maybe on this page?
http://hibernate.bluemars.net/index.php?node=28
Matt
Jon - this looks great. I'm assuming this works great when calling DAOs or
Hibernate persistence classes directly from the web tier. If I have the
following layers
web (action classes)
service (business logic)
persistence (daos)
And I'd like to use JUnit/Cactus to test them all. If I use your
TECTED]
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> >
>
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.c
Title: RE: Setting autocommit=false [SOLVED]
Nevermind - I figured it out. I needed to add the following in Tomcat's DBCP configuration:
defaultAutoCommit
false
Thanks,
Matt
> -Original Message-
> From:
Personally, I would say "give me anything I can run from Ant" and I'll
be a Happy Camper. Allow me to run it from Maven and I'll be tickled
pink - as soon as I get the time to truly grok maven.
Matt
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf
If I'm not using hibernate.properties (well, for Junit tests I am), but
rather hibernate.cfg.xml - can I add this property there?
I'm trying to get both ids and names so I can create a LabelValueBean
for rendering in a drop-down list on the UI. A LabelValueBean is a
class w/in Struts, but now tha
Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Gavin King
> Sent: Thursday, January 02, 2003 7:47 PM
> To: Matt Raible; [EMAIL PROTECTED]
> Subject: RE: [Hibernate] Hibernate Thread Local Session and JUnit
>
>
>
> > The old way I was
ach would take care of all of your problems.
>
> Regards,
> Jon...
>
> Let me know if you want to
> On Thursday, January 2, 2003, at 09:01 PM, Matt Raible wrote:
>
> > I *think* I fixed this problem by implementing a Connection Pool in
> > Tomcat and
>
I am using the Thread Local Session Design Pattern as documented at:
http://hibernate.bluemars.net/42.html
This worked great in my web application when running through Tomcat. Tomcat
uses Commons DBCP for connection pooling.
The old way I was doing it - now obviously kludgy - was to create a ne
ex.printStackTrace();
> }
> }
>
> return headendList;
>
> }
>
> }
>
> ---
> This sf.net email is sponsored by:ThinkGeek
> Wel
>
> This is more or less what commons-lang's reflectionToString
> does (which is what Gavin's patch will make the CodeGenerator do now)
>
> But what about your hashCode ?
>
> /max
>
I'm looking for advice on how to implement an equals() and hashCode()
method in my base class. Any suggestion
Is it recommended that all hibernate persistent classes implement
equals() and hashcode()? If so, is it possible to implement them in a
base class? I'm doing this write now with the following toString()
method and it works pretty well:
public String toString() {
StringBuffer results
unsaved-value="null" worked like a charm - thanks ;-)
I actually got that answer off the FAQ this morning - nice doco!
Matt
> -Original Message-
> From: Gavin King [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 27, 2002 9:19 PM
> To: Matt Raible; [EMAIL PR
Title: saveOrUpdate vs. update
I have a BaseDAO that contains some generic (I think) Hibernate compatible code. It's basically removeObject, storeObject, and retrieveObject. I've found that Hibernate tries to do an INSERT if I use sess.saveOrUpdate in the following method:
protected vo
---Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Konstantin Priblouda
> Sent: Sunday, December 22, 2002 7:00 AM
> To: Matt Raible
> Cc: hibernate-devel
> Subject: Re: [Hibernate] Problem using Xdoclet to generate
> relationships [newbi
Title: Problem using Xdoclet to generate relationships [newbie]
I'm a rookie at using Hibernate, so please bear with me.
I have User object that has a one-to-many mapping to a Resume object. I am getting the exception below when trying to persist the resume.
I believe I might be doing som
-Original Message-
>> From: Gavin King [mailto:[EMAIL PROTECTED]
>> Sent: Friday, December 20, 2002 3:57 PM
>> To: Raible, Matt
>> Cc: [EMAIL PROTECTED]
>> Subject: RE: [Hibernate] Oracle error
>>
>>
>> Correct QL syntax is:
>>
>>
I am trying to use Hibernate to connect to Oracle. I was using MySQL -
where everything worked. All I've changed (so far) was the tablename from
"user" to "cct_user". Now I'm getting the following error:
[junit] Testcase:
testGetUser(com.cable.comcast.dmc.itd.cct.persistence.ApplicationDAOHi
I'm using the following ant task to accomplish this:
HTH,
Matt
> -Original Message-
> From: [EMAIL PR
29 matches
Mail list logo