RE: Major issue with Hibernate Filters
by Steve Ebersole
You need to point me to where we ever created an example of filter usage
"in order to achieve uniqueness". That is expressly *not* a usage of
filters; filters by definition cannot change the multiplicity of an
association.
-----Original Message-----
From: hibernate-dev-bounces(a)lists.jboss.org
[mailto:hibernate-dev-bounces@lists.jboss.org] On Behalf Of Alex Bacon
Sent: Friday, September 08, 2006 4:51 AM
To: hibernate-dev(a)lists.jboss.org
Subject: Major issue with Hibernate Filters
Hibernate developers,
I'm afraid the forums had nothing about this issue - and I believe I
have found the bit of Hibernate coding causing the problem:
I have spent the last few weeks trying to get the Filters to work as per
the example in the Hibernate reference manual - the problem is that
filters are only currently applied for queries - they are not applied
when lazy loading entities - this causes major errors when using the
historical filters as per your example that need the filters in order to
achieve uniqueness. (I cannot realistically eager load everything in
the database!
Here is the bit of code from AbstractEntityLoader that appears to be
causing the problem:
public void processFilters(String sql, SessionImplementor session) {
if ( session.getEnabledFilters().size()==0 ||
sql.indexOf(ParserHelper.HQL_VARIABLE_PREFIX)<0 ) {
// HELLA IMPORTANT OPTIMIZATION!!!
processedPositionalParameterValues =
getPositionalParameterValues();
processedPositionalParameterTypes =
getPositionalParameterTypes();
processedSQL = sql;
}
else {
Do you agree this is an issue - and if so - I take it I should raise it
as a JIRA issue. If not - can you suggest a workaround?
Alex
-----Original Message-----
From: hibernate-dev-bounces(a)lists.jboss.org on behalf of
hibernate-dev-request(a)lists.jboss.org
Sent: Fri 9/8/2006 12:17 PM
To: hibernate-dev(a)lists.jboss.org
Subject: hibernate-dev Digest, Vol 3, Issue 32
Send hibernate-dev mailing list submissions to
hibernate-dev(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/hibernate-dev
or, via email, send a message with subject or body 'help' to
hibernate-dev-request(a)lists.jboss.org
You can reach the person managing the list at
hibernate-dev-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of hibernate-dev digest..."
Today's Topics:
1. hibernate-sybase-testsuite Build Completed With Testsuite
Errors (qa(a)jboss.com)
----------------------------------------------------------------------
Message: 1
Date: Thu, 7 Sep 2006 22:17:33 -0400 (EDT)
From: qa(a)jboss.com
Subject: [hibernate-dev] hibernate-sybase-testsuite Build Completed
With Testsuite Errors
To: hibernate-dev(a)lists.jboss.org, sebersole(a)jboss.com
Message-ID:
<29070998.1157681853831.JavaMail.cruisecontrol(a)dev01.qa.atl.jboss.com>
Content-Type: text/plain; charset="us-ascii"
An HTML attachment was scrubbed...
URL:
http://lists.jboss.org/pipermail/hibernate-dev/attachments/20060907/4cb1
300f/attachment.html
------------------------------
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
End of hibernate-dev Digest, Vol 3, Issue 32
********************************************
18 years, 3 months
Major issue with Hibernate Filters
by Alex Bacon
Hibernate developers,
I'm afraid the forums had nothing about this issue - and I believe I have found the bit of Hibernate coding causing the problem:
I have spent the last few weeks trying to get the Filters to work as per the example in the Hibernate reference manual - the problem is that filters are only currently applied for queries - they are not applied when lazy loading entities - this causes major errors when using the historical filters as per your example that need the filters in order to achieve uniqueness. (I cannot realistically eager load everything in the database!
Here is the bit of code from AbstractEntityLoader that appears to be causing the problem:
public void processFilters(String sql, SessionImplementor session) {
if ( session.getEnabledFilters().size()==0 || sql.indexOf(ParserHelper.HQL_VARIABLE_PREFIX)<0 ) {
// HELLA IMPORTANT OPTIMIZATION!!!
processedPositionalParameterValues = getPositionalParameterValues();
processedPositionalParameterTypes = getPositionalParameterTypes();
processedSQL = sql;
}
else {
Do you agree this is an issue - and if so - I take it I should raise it as a JIRA issue. If not - can you suggest a workaround?
Alex
-----Original Message-----
From: hibernate-dev-bounces(a)lists.jboss.org on behalf of hibernate-dev-request(a)lists.jboss.org
Sent: Fri 9/8/2006 12:17 PM
To: hibernate-dev(a)lists.jboss.org
Subject: hibernate-dev Digest, Vol 3, Issue 32
Send hibernate-dev mailing list submissions to
hibernate-dev(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/hibernate-dev
or, via email, send a message with subject or body 'help' to
hibernate-dev-request(a)lists.jboss.org
You can reach the person managing the list at
hibernate-dev-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of hibernate-dev digest..."
Today's Topics:
1. hibernate-sybase-testsuite Build Completed With Testsuite
Errors (qa(a)jboss.com)
----------------------------------------------------------------------
Message: 1
Date: Thu, 7 Sep 2006 22:17:33 -0400 (EDT)
From: qa(a)jboss.com
Subject: [hibernate-dev] hibernate-sybase-testsuite Build Completed
With Testsuite Errors
To: hibernate-dev(a)lists.jboss.org, sebersole(a)jboss.com
Message-ID:
<29070998.1157681853831.JavaMail.cruisecontrol(a)dev01.qa.atl.jboss.com>
Content-Type: text/plain; charset="us-ascii"
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20060907/4cb13...
------------------------------
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
End of hibernate-dev Digest, Vol 3, Issue 32
********************************************
18 years, 3 months