[Hibernate] proxy, abstract class, ClassCastException.

2003-09-10 Thread jiesheng zhang
My problem is that I know one object is type A, but when I try to cast to A, I got a ClassCastException. I have four classes in my cases: ContentDB, ServerFileSysNode, InnerNode, and SharedFileSysNode. ServerFileSysNode(abstract) InnerNode (concrete subclass of ServerFileSysNode, may have

Re: [Hibernate] proxy, abstract class, ClassCastException.

2003-09-10 Thread Gavin King
If you configure a polymorphic association to use proxies, this is what happens. If you need to do a typecast, either: (1) use outer-join="true" on the association OR (2) call session.load(Subtype.class, proxy.getId() ) to narrow the proxy type. we can't possibly know a subtype w/o hitting the

Re: [Hibernate] self-referential table

2003-09-10 Thread sw-list
On Tuesday, September 9, 2003, at 07:07 PM, Gavin King wrote: Theres nothing particularly special about this. Just map it as you would any other association. The only problem is your -1, which breaks referential integrity of the whole table! just switch to using an SQL null. Ok, I guess this is

[Hibernate] Question on Session.connection

2003-09-10 Thread Chandrasekhar Ambadipudi
I have a transaction like this Transaction tx = sess.beginTransaction(); sess.save(obj) sess.connection() // and one prepared statment execution here sess.update(obj1) tx.comm

[Hibernate] CVS Problems

2003-09-10 Thread Michael Gloegl
Hi everybody, when trying to connect to the CVS I constantly get "EOF from Server" and "Connection Reset by Peer" errors. Is anyone else having such problems in the moment? Michael --- This sf.net email is sponsored by:ThinkGeek Welcome to

Re: [Hibernate] Question on Session.connection

2003-09-10 Thread Gavin King
Just call sess.flush() ... you can call it at any time :) Chandrasekhar Ambadipudi wrote: I have a transaction like this Transaction tx = sess.beginTransaction(); sess.save(obj) sess.connection() // and one prepared statm

[Hibernate] What is the difference between version 2.0.3 and 2.1??

2003-09-10 Thread Vivian Fonger
Title: Message Hi everyone,   Can anyone give me the difference between version 2.0.3 and version 2.1.?? Will I have any problem to upgrade from version 2.0.3 to version 2.1 when the version 2.1 becomes stable??   Vivian Fonger Software Engineer Socketware [EMAIL PROTECTED]  

[Hibernate] Reducing startup time (with a small solution)

2003-09-10 Thread Andrea Aime
Hi Gavin, hi everybody, it seems I've found a way to reduce even further the startup time of my application. Basically, I've changed the sax parser to the RealtimeParser included in Jade (jade.dautelle.com) and had to comment out the reader.setValidation(true); in the XMLHelper.CreateSaxReader(stri

[Hibernate] How to use JCS in Hibernate

2003-09-10 Thread Yin Shi
Hi all, In our database, there is a table called codsc. We access the codsc table many times in all parts of our application. The data rarely changes, so it is a good candidate for caching. The primary key of codsc is id, code. The columns we need cached are desc, dstat. Basically we want

RE: [Hibernate] CVS Problems

2003-09-10 Thread Schnitzer, Jeff
> From: Michael Gloegl [mailto:[EMAIL PROTECTED] > > when trying to connect to the CVS I constantly get "EOF from Server" and > "Connection Reset by Peer" errors. Is anyone else having such problems > in the moment? Yes. I was getting them yesterday too. (using anonymous cvs) Jeff Schnitzer [E

[Hibernate] MappingException: Repeated column in mapping for collection (no idea what is it)

2003-09-10 Thread Vivian Fonger
Title: Message Hi everyone,   I got the following error at hibernate version 2.0.3 and I have no idea what does it mean??    net.sf.hibernate.MappingException: Repeated column in mapping for collection: com.accucast4.testcase5.Customer.recipients column: RC_C_ID at net.sf.hibernate.collect

RE: [Hibernate] CVS Problems

2003-09-10 Thread Patrick Burleson
At 01:51 PM 9/10/2003 -0700, Schnitzer, Jeff wrote: > From: Michael Gloegl [mailto:[EMAIL PROTECTED] > > when trying to connect to the CVS I constantly get "EOF from Server" and > "Connection Reset by Peer" errors. Is anyone else having such problems > in the moment? Yes. I was getting them yest

Re: [Hibernate] CVS Problems

2003-09-10 Thread Warner Onstine
With a number of SF projects. It's been going on since yesterday morning. -warner On Wednesday, September 10, 2003, at 05:33 AM, Michael Gloegl wrote: Hi everybody, when trying to connect to the CVS I constantly get "EOF from Server" and "Connection Reset by Peer" errors. Is anyone else havin

Re: [Hibernate] self-referential table

2003-09-10 Thread Warner Onstine
Got this working! Now I have another question with regards to collections in general. I tried to do this: Set subCategories; public void setSubCategories() public Set getSubCategories() public void addSubCategory() public void removeSubCategory() in add and remove I refer to the collection subCat

[Hibernate] Postgresql array index exception creating a new record

2003-09-10 Thread Gerry Duprey
Howdy, I'm new to hibernate and have run into a problem almost immediatly in my test program while trying to save a new object/record. I've tried this with Hibernate 2.0.3 and 2.1b3. This is on PostreSQL7. After creating a hibernatable object instance, I attempt to save it and close the transact

RE: [Hibernate] Question on Session.connection

2003-09-10 Thread Chandrasekhar Ambadipudi
Thanks, it worked. -Original Message- From: Gavin King [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 11:21 AM To: Chandrasekhar Ambadipudi Cc: '[EMAIL PROTECTED]' Subject: Re: [Hibernate] Question on Session.connection Just call sess.flush() ... you can call it at any ti

Re: [Hibernate] Postgresql array index exception creating a new record

2003-09-10 Thread Gavin King
I think it is a bug in the Postgres implementation of JDBC batch updates. Gerry Duprey wrote: Howdy, I'm new to hibernate and have run into a problem almost immediatly in my test program while trying to save a new object/record. I've tried this with Hibernate 2.0.3 and 2.1b3. This is on Postr

Re: [Hibernate] self-referential table

2003-09-10 Thread Gavin King
Nope, the set/get are required. Warner Onstine wrote: Got this working! Now I have another question with regards to collections in general. I tried to do this: Set subCategories; public void setSubCategories() public Set getSubCategories() public void addSubCategory() public void removeSubCateg

Re: [Hibernate] What is the difference between version 2.0.3 and 2.1??

2003-09-10 Thread Gavin King
Should be 99.9% backward compatible. There are some "little" changes that might trip up a very small number of users, but they are mainly in the realm of "bugfixes". Vivian Fonger wrote: Hi everyone, Can anyone give me the difference between version 2.0.3 and version 2.1.?? Will I have any p

Re: [Hibernate] self-referential table

2003-09-10 Thread jiesheng zhang
It definitely works. I have many such methods like what you mentioned. Post your method implementation and exception here. Let me have a look. jason --- Warner Onstine <[EMAIL PROTECTED]> wrote: > Got this working! > > Now I have another question with regards to > collections in general. > >