I’ve been trying to use the where clause for
on hibernate for quite a long time.
The main reason I’m using it is because we’re
implementing a soft-delete (setting a flag to 0, instead of a SQL DELETE
statement).
And then I use the where=”active_ind=1” to
retrieve only active children.
Caldas, Marcelo wrote:
Shouldn’t it be better if
I could specify a HQL for
the where clause and Hibernate put the sql together for me?
No, usually where clause apply to non mapped columns.
How can I solve my problem then?
From: Emmanuel Bernard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 27, 2004
8:40 AM
To: Caldas, Marcelo
Cc:
[EMAIL PROTECTED]
Subject: Re: [Hibernate] where
clause for collections.
Caldas, Marcelo wrote:
Shouldn’t it be bette
Caldas, Marcelo wrote:
And then I use the where=”active_ind=1” to retrieve only active children.
First problem is I’m getting “ambiguous column name ‘active_ind’”
because most of the tables have an active_ind column – same name.
Hibernate should automatically prefix the column name. What does the
I have received permission to contribute my hibernate oscache provider patch. Here is
the unified patch, the whole classes are attached:
Index: OSCache.java
===
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cache/OSCa
Here's a snapshot of what's going on:
Hibernate: select orgtypes0_.organization_id as organiza5___,
orgtypes0_.organization_type_id as organiza1___,
orgtypes0_.organization_type_id as organiza1_2_, orgtypes0_._version as
_version2_, orgtypes0_.primary_ind as primary_3_2_,
orgtypes0_.organization_t