[Hibernate-JIRA] Created: (ANN-693) org.hibernate.engine.query.sql.NativeSQLQueryScalarReturn not serializable
by Eugeniusz Neugebauer (JIRA)
org.hibernate.engine.query.sql.NativeSQLQueryScalarReturn not serializable
--------------------------------------------------------------------------
Key: ANN-693
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-693
Project: Hibernate Annotations
Issue Type: Bug
Environment: jboss 4.2.2, HB 3.2.5
Reporter: Eugeniusz Neugebauer
In my domain class I've NamedNativeQuery:
@SqlResultSetMappings({@SqlResultSetMapping(name = "uir_suma_zbiorow_result", columns = @ColumnResult(name = "result"))})
@NamedNativeQueries({@NamedNativeQuery(name = "uir.uir_suma_zbiorow", query = "select uir_suma_zbiorow(:var1, :var2, :var3) as result", resultSetMapping = "uir_suma_zbiorow_result")})
During build session factory on jboss i have Exception:
Caused by: javax.naming.CommunicationException [Root exception is java.io.NotSerializableException: org.hibernate.engine.query.sql.NativeSQLQueryScalarReturn]
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:618)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:552)
at org.jboss.util.naming.Util.bind(Util.java:102)
at org.jboss.util.naming.Util.bind(Util.java:89)
at pl.computerland.syriusz.std.hibernate.jmx.Hibernate2.bind(Hibernate2.java:429)
--
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
17 years, 10 months
[Hibernate-JIRA] Created: (HHH-3084) DialectFactory.java doesn't map the IngresDialect
by Michael Leo (JIRA)
DialectFactory.java doesn't map the IngresDialect
-------------------------------------------------
Key: HHH-3084
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3084
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5, 3.2.4.sp1, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0.ga, 3.2.0.cr5, 3.2.0.cr4, 3.2.0.cr3, 3.2.0.cr2, 3.2.0 cr1, 3.1.3, 3.2.0.alpha2, 3.2.0.alpha1, 3.1.2, 3.1.1, 3.1, 3.1 rc3, 3.1 rc2, 3.1 rc 1, 3.1 beta 2, 3.1 beta 1, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0 final, 3.0 rc 1, 3.0 beta 4, 3.0 beta 3, 3.0 beta 2, 3.0 beta 1, 3.0 alpha
Environment: Hibernate 3.x and frameworks based on the Spring Framework, like Grails
Reporter: Michael Leo
Attachments: DialectFactory.java.patch
Although Hibernate ships with an Ingres dialect
org.hibernate.dialect.IngresDialect
it can't be found by the dialect factory
org.hibernate.dialect.DialectFactory
Although most tools can be forced to use the proper dialect, there is a circumstance
in Grails where there is no way to specify the correct Hibernate dialect for a custom
data source.
The patch is pretty straightforward. I've attached the output of "svn diff" from the
root of the latest branch.
Hope this makes sense,
Mike Leo
$ svn diff
Index: src/org/hibernate/dialect/DialectFactory.java
===================================================================
--- src/org/hibernate/dialect/DialectFactory.java (revision 14289)
+++ src/org/hibernate/dialect/DialectFactory.java (working copy)
@@ -112,6 +112,9 @@
private static final Map MAPPERS = new HashMap();
static {
// TODO : this is the stuff it'd be nice to move to a properties file or some other easily user-editable place
+ MAPPERS.put( "Ingres", new VersionInsensitiveMapper( "org.hibernate.dialect.IngresDialect" ) );
+ MAPPERS.put( "ingres", new VersionInsensitiveMapper( "org.hibernate.dialect.IngresDialect" ) );
+ MAPPERS.put( "INGRES", new VersionInsensitiveMapper( "org.hibernate.dialect.IngresDialect" ) );
MAPPERS.put( "HSQL Database Engine", new VersionInsensitiveMapper( "org.hibernate.dialect.HSQLDialect" ) );
MAPPERS.put( "DB2/NT", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
MAPPERS.put( "DB2/LINUX", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
$
--
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
17 years, 10 months
[Hibernate-JIRA] Created: (HHH-2957) ActionQueue Insertion sort performance degrades exponentially
by Jay Erb (JIRA)
ActionQueue Insertion sort performance degrades exponentially
-------------------------------------------------------------
Key: HHH-2957
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2957
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Reporter: Jay Erb
Attachments: ActionQueue.java, NewInsertActionSorter.java
The algorithm for sorting entity insertions performs poorly for when flushing large numbers of entity insertions.
There are a few reasons for this:
1. The sort used linear searches over lists which required nested looping.
2. ArrayLists were used to hold the insertion events. ArrayLists give good performance for looping but they have a couple of significant drawbacks:
a. Whenever a new item is added to the list, the list is rebuilt with the new size, which causes another loop over all the entries in the list.
b. Since it is an array, a contiguous block of memory must be found to hold the array. As the array get large, it gets harder and harder to find a contiguous block large enough. This causes the garbage collector to be run more often, which obviously reduces performance again.
I changed the algorithm so that the product of the sort is exactly the same. The difference is that I used hashes for searches and LinkedLists for storing the insertions. The performance is linear.
Attached are my changes.
--
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
17 years, 10 months
[Hibernate-JIRA] Commented: (ANN-401) @OrderBy does not work with inherited properties
by Dave Whittaker (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-401?page=co... ]
Dave Whittaker commented on ANN-401:
------------------------------------
I'm curious as to why this would be so difficult. Could one not just check the metadata for the target object to see where the order by property is within the class hierarchy and then do an additional join to the table that represents the targets superclass? Ok, that was clearer in my head than it sounds when I re-read it. Basically, using the example above (with joined inheritance) why can't the location of propertyForOrderBy by determined to be class A (I'm assuming Hibernate already has this information available), which could result in the table for class A being joined during the query using the primary keys of A and B, then the order by would simply have to reference the table for A. Or am I completely off here.......
> @OrderBy does not work with inherited properties
> ------------------------------------------------
>
> Key: ANN-401
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-401
> Project: Hibernate Annotations
> Issue Type: Bug
> Components: binder
> Affects Versions: 3.2.0.cr1
> Environment: Hibernate 3.2, MySql 4, Windows XP
> Reporter: Guido Laures
>
> Using an @OrderBy with an inherited property produces an SQL Exception.
> Example:
> @Entity
> class Base {
> ...
> public int getPropertyForOrderBy(){ return propertytoOrderBy; }
> ...
> }
> @Entity
> @PrimaryKeyJoinColumn(name="a_id")
> class A extends Base {
> ...
> }
> @Entity
> @PrimaryKeyJoinColumn(name="b_id")
> class B extends Base {
> ...
> @OneToMany(mappedBy = "someProp", cascade = { CascadeType.ALL })
> @OrderBy("propertyToOrderBy")
> public Set<A> getASet() {
> return this.aSet;
> }
> ...
> }
> Thus, if A references a set of Bs and wants it to be ordered by a property of B's base class Base it crashes. The generated SQL string tries to find the property from the base class in the table of the inerited class (A) which fails.
--
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
17 years, 10 months