[Hibernate-JIRA] Created: (HHH-2381) Criteria API : Order by Native SQL
by Sami Dalouche (JIRA)
Criteria API : Order by Native SQL
-----------------------------------
Key: HHH-2381
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2381
Project: Hibernate3
Type: Improvement
Components: query-criteria
Reporter: Sami Dalouche
Hi,
It would be nice to be able to specify the ORDER BY clause using Native SQL. (It is currently doable by subclassing the Order class, but some nice solution would allow the order to specify attributes on another table..)
Let's take a simple example : I have a distance("attribute", geometry) function, that is of course, proprietary.
I am quering table A, which I can join to table B to get the "attribute", on which I want to apply my distance() function.
If I create my own Order subclass, and addOrder on the criteria, the distance("attribute, geometry) is going to refer to the main criteria's class mapping.
So, something like addOrder("objectpath.joined", new MyOrder(...)); would be perfect.
What do you think ?
Regards,
Sami Dalouche
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
11 years, 9 months
[Hibernate-JIRA] Created: (ANN-469) bulk update with native sql queries
by Amir Pashazadeh (JIRA)
bulk update with native sql queries
-----------------------------------
Key: ANN-469
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-469
Project: Hibernate Annotations
Type: Improvement
Components: binder
Versions: 3.2.0.ga
Reporter: Amir Pashazadeh
Priority: Critical
Hibernate Annotations 3.2 does not support bulk update/deletes using native queries,
if I have something like:
@NamedNativeQuery(name = "testQuery", query = "delete from tb_test where id = ?")
in one of my entities, there will be following exception during build of SessionFactory :
Exception in thread "main" org.hibernate.cfg.NotYetImplementedException: Pure native scalar queries are not yet supported
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:118)
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQueries(QueryBinder.java:197)
at org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:281)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:404)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:452)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:268)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210)
------
I made a mistake and I reported this issue as HHH-2147 as an issue about Hibernate core! :(
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
11 years, 9 months
[Hibernate-JIRA] Created: (HHH-2171) Transaction Rollback Problem in GA due to jboss cache alpha dependency
by bhumika thakkar (JIRA)
Transaction Rollback Problem in GA due to jboss cache alpha dependency
----------------------------------------------------------------------
Key: HHH-2171
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2171
Project: Hibernate3
Type: Bug
Components: build
Versions: 3.2.0.ga
Reporter: bhumika thakkar
We upgraded to Hibernate GA, and started getting Transaction Rolloback Exception. GA release is distributed with JBoss cache alpha quality dependency. Upgrading to the current production release of it fixes the issue.
Stack trace:
org.jboss.cache.interceptors.TxInterceptor.runRollbackPhase Rollback had
a problem
java.lang.IllegalStateException: local transaction Transaction[]
transaction does not match running tx null
at
org.jboss.cache.interceptors.TxInterceptor.handleCommitRollback(TxInterc
eptor.java:616)
at
org.jboss.cache.interceptors.TxInterceptor.runRollbackPhase(TxIntercepto
r.java:696)
at
org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.
afterCompletion(TxInterceptor.java:947)
at
org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompleti
on(OrderedSynchronizationHandler.java:80)
at
com.caucho.transaction.TransactionImpl.callAfterCompletion(TransactionIm
pl.java:893)
at
com.caucho.transaction.TransactionImpl.commit(TransactionImpl.java:713)
at
com.caucho.transaction.TransactionManagerImpl.commit(TransactionManagerI
mpl.java:263)
at
com.caucho.jca.UserTransactionImpl.commit(UserTransactionImpl.java:411)
at
com.caucho.jca.UserTransactionProxy.commit(UserTransactionProxy.java:142
)
at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTr
ansactionManager.java:787)
at
org.springframework.transaction.support.AbstractPlatformTransactionManag
er.processCommit(AbstractPlatformTransactionManager.java:500)
at
org.springframework.transaction.support.AbstractPlatformTransactionManag
er.commit(AbstractPlatformTransactionManager.java:473)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.doC
ommitTransactionAfterReturning(TransactionAspectSupport.java:267)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo
pProxy.java:176)
at $Proxy119.executeCallback(Unknown Source)
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
11 years, 9 months
[Hibernate-JIRA] Created: (HHH-2218) java.util.ConcurrentModificationException at org.hibernate.pretty.Printer.toString(Printer.java:90)
by rm (JIRA)
java.util.ConcurrentModificationException at org.hibernate.pretty.Printer.toString(Printer.java:90)
---------------------------------------------------------------------------------------------------
Key: HHH-2218
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2218
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.1.3
Environment: Hibernate 3.1.3, spring 2.1.8 on Jboss 4.0.2 with Oracle 10g
Reporter: rm
Similar issues have been logged since May 2005 and have been marked as 'Fixed' by Gavin especially for Session.toString() related cases. However, I am also facing similar issues in Printer.toString()...
The saving grace is that when I set the debug level to INFO, the problem goes away...
Am copy/pasting the relevent stacktrace...I have also debugged this on eclipse and the exact location is the call to "new Printer(....)" in AbstractFlushingEventListener.java
java.util.ConcurrentModificationException
10:07:28,421 INFO [STDOUT] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)
10:07:28,421 INFO [STDOUT] at java.util.HashMap$ValueIterator.next(HashMap.java:817)
10:07:28,421 INFO [STDOUT] at org.hibernate.pretty.Printer.toString(Printer.java:90)
10:07:28,421 INFO [STDOUT] at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:97)
10:07:28,421 INFO [STDOUT] at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
10:07:28,421 INFO [STDOUT] at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:954)
10:07:28,421 INFO [STDOUT] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1099)
10:07:28,421 INFO [STDOUT] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
PS: This is my first attempt at logging issues at JIRA. Kindly point out any deficiencies or irregularities in this attempt.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HHH-2031) Add functions to Dialect that can disable use of schema and catalog parts -- for HSQLDB support
by Brian Holmes (JIRA)
Add functions to Dialect that can disable use of schema and catalog parts -- for HSQLDB support
-----------------------------------------------------------------------------------------------
Key: HHH-2031
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2031
Project: Hibernate3
Type: Patch
Components: core
Versions: 3.1.3
Environment: This patch is against r9668 of /tags/v313/Hibernate3.
Reporter: Brian Holmes
Attachments: hibernate3-v313-support_schema_catalog_names.patch
HSQLDB does not support the use of three part names, that is Tables with schema and catalog parts.
This patch adds two functions to Dialect: supportsSchemaNames() and supportsCatalogNames(). Table.getQualifiedName() checks these values to decide whether to use or ignore the schema and catalog parts.
By default these are enabled in Dialect. This patch only disables their use in HSQLDialect.
This change is necessary for people who normally use Schema and Catalog names for access their primary database, but also use HSQLDB for Unit Testing. Without it, HSQLDB is unusable for Unit Testing because it fails on use of any catalog or schema names.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HHH-2448) Generate identical column aliases among cluster
by Loïc LEFEVRE (JIRA)
Generate identical column aliases among cluster
-----------------------------------------------
Key: HHH-2448
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2448
Project: Hibernate3
Type: Improvement
Components: query-sql
Versions: 3.2.2
Environment: Hibernate version: 3.2.2, 2.1.8
Database: Oracle 9.2.0.8
Reporter: Loïc LEFEVRE
Attachments: report_1.txt, report_2.txt
Among our weblogic cluster (12 instances), we can see that a query can have different column aliases.
Although all seems correct, when regarding database reports like StatsPack or Spotlight we can see that because of these different aliases, the reports are wrong. Indeed, a resource consuming query can see its associated report properties (cpu usage, buffer gets, number of executions...) divided by the number of weblogic instances of our cluster (i.e. divided by 12) thus preventing us to pinpoint the queries to look at.
On a 3 instances cluster, we can see this report:
REPORT#1: one statement with a poor number of buffer gets/execution is reported splitted in 3, see the alias generated for column DTO.CREATION_DATE
for example
On a 4 instances cluster, we can see this report:
REPORT#2: one statement responsible of the latch free/cache buffers chains wait events splitted in 4, note the column alias generated fordeffcashcy0_.BEST_EXPECTED_CY
More than confusing the DBAs about the same query with n different "faces", our reports don't show us all the queries to look at: indeed, in our "Top 50 queries", a lot of them are duplicates! Also the memory required in the SGA to store the queries, the execution plan and so on is increased...
Finally, although the column aliases can have up to 30 characters under Oracle, the limit is set to 10, why?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
11 years, 10 months