[Hibernate-JIRA] Commented: (HHH-1476) Table.qualify does not handle dialect diferences
by Grant Sheppard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1476?page=c... ]
Grant Sheppard commented on HHH-1476:
-------------------------------------
I'm not sure what the process is for assigning bugs for resolution but does anyone know what is happening with this one? I've come across this with an Informix database and it would be nice to have an idea of what version we can expect a fix in.
> Table.qualify does not handle dialect diferences
> ------------------------------------------------
>
> Key: HHH-1476
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1476
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Environment: Hibernate 3.1.2
> SQL Server 2000
> Reporter: Justin Kolb
> Attachments: informix-table-qname-patch-NPAC-vs-v324sp1.diff, informix-table-qname-patch-NPAC.diff, informix-table-qname-patch.diff
>
>
> The fix for HHH-699 caused me to discover that Hibernate isn't handling qualifying table names properly. It can be inferred from HHH-699 that not all databases are similar in this respect so I think this should be added to the dialect handling. From my short research I have the following 3 cases:
> SQL Server: database.owner.table
> MySQL: database.table (no schemas it seems)
> Most others: catalog.schema.table
> SQL Server also allows for "database..table" since it does not have schemas but does allow you to write queries that cross databases similar to how you can cross schemas in other database servers.
> Testing on Postgres though I determined that it does not allow "catalog..table" and will only accept "catalog.schema.table", so it dos not match up with SQL Server in this respect. If you write "catalog.table" it thinks you are trying to use a schema so it does not match up with MySQL in this respect.
> So right now only MySQL and SQL Server are the non standard compliant databases. Before 3.1 beta 1, SQL Server was handled correctly; then after that only MySQL was handled correctly.
> I'm not sure how much work it would take to make this change.
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (EJB-366) Using setMaxResults with a NativeQuery with DB2 generates non-working SQL
by Toni Lyytikäinen (JIRA)
Using setMaxResults with a NativeQuery with DB2 generates non-working SQL
-------------------------------------------------------------------------
Key: EJB-366
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-366
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.4.0.CR1, 3.3.2.GA
Environment: Linux 2.6.24, DB2 Express-C V9.5.0.0, Glassfish V2
Reporter: Toni Lyytikäinen
Priority: Critical
Creating a simple native query like the following:
Query query=entityManager.createNativeQuery("select t.* from test");
and setting the setMaxResults to some value generates an SQL sentence which is incorrect as it has an extra parenthesis in the beginning:
query.setMaxResults(15);
Log output:
Hibernate: (select * from ( select rownumber() over() as rownumber_, t.* from test t ) as temp_ where rownumber_ <= ?
Jun 5, 2008 12:31:05 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -104, SQLState: 42601
Jun 5, 2008 12:31:05 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=END-OF-STATEMENT;here rownumber_ <= ?;), DRIVER=3.50.152
Jun 5, 2008 12:31:05 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -727, SQLState: 56098
Jun 5, 2008 12:31:05 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-104;42601;END-OF-STATEMENT|here rownumber_ <= ?|), DRIVER=3.50.152
Jun 5, 2008 12:31:05 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -727, SQLState: 56098
Jun 5, 2008 12:31:05 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-104;42601;END-OF-STATEMENT|here rownumber_ <= ?|), DRIVER=3.50.152
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3331) SQL for a OneToMany-association does not include the target type's @Where restriction
by Adrian Moos (JIRA)
SQL for a OneToMany-association does not include the target type's @Where restriction
-------------------------------------------------------------------------------------
Key: HHH-3331
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3331
Project: Hibernate3
Issue Type: Bug
Reporter: Adrian Moos
Priority: Minor
@Entity
class A {
@OneToMany(mappedBy="a", targetEntity=B.class)
Set<B> getBs();
}
@Entity
@Where(clause = "someColumn > 1")
class B {
@ManyToOne(targetEntity = A.class, optional = false, fetch = FetchType.LAZY)
@JoinColumns(...)
A getA();
}
The call
session.createCriteria(A.class).createAlias("bs", "b").list();
issues an SQL-Statement missing the restriction "b.someColumn > 1".
Analysis reveals that the JoinWalker delegates to OuterJoinableAssociation, who in turn delegates to joinableType.getOnCondition(...). In my case, joinableType is an instance of AbstractCollectionPersister, whose implementation of getOnCondition(...) only checks for a where annotation on the collection mapping, but not on the target entity.
A workaround obviously is to redundantly annotate the restriction of the collection mapping as well.
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3328) Paging query error
by Sonix Legend (JIRA)
Paging query error
------------------
Key: HHH-3328
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3328
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Environment: Hibernate 3.2.6ga, Oracle 9.2
Reporter: Sonix Legend
Priority: Blocker
I have two mapping files.
A.hbm.xml
<composite-id name="id" class="ID">
<key-property name="a1">
<column name="A1"/>
</key-property>
<key-property name="a2">
<column name="A2"/>
</key-property>
</composite-id>
<set name="b">
<key>
<column name="B1"/>
<column name="B2"/>
</key>
<one-to-many class="B"/>
</set>
B.hbm.xml
<property name="b1">
<column name="B1"/>
</property>
<property name="b2">
<column name="B2"/>
</property>
<many-to-one name="a" class="A">
<column name="B1"/>
<column name="B2"/>
</many-to-one>
And I have a query language.
"select b from B as b left outer join b.a as a"
It's right when the query executed.
But when I set the "max results" property, it reported a error which content is "SQL Error: 918, SQLState: 42000 ORA-00918: column ambiguously defined".
--
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
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3330) Allow configuration of read-only entities for each session independently
by Rodrigo Ezequiel Merino (JIRA)
Allow configuration of read-only entities for each session independently
------------------------------------------------------------------------
Key: HHH-3330
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3330
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Environment: 3.2.5.GA, Database independent
Reporter: Rodrigo Ezequiel Merino
Priority: Minor
Attachments: ConfigurableReadOnlyPersistenceContext.java
Some batch processes have input data which isn't modified during that process, but which may be updated in other use cases. However, when the batch process session is flushed, those unmodifiable objects are checked for needed updates. This can lead to a significant performace degradation when dealing with large volumes of objects.
It would be of great help to be able to inform the session at creation time which entities are read-only for that session. When an object is added to the persistenceContext or its status changed, if its status is MANAGED and its class is one of the configured as read-only, the status is changed to READ_ONLY.
In addition to the less cpu time consumed, it frees the memory used by the snapshot copy used for dirty checking.
This code is implemented as a decorator for the PersistenceContext and attached in this issue.
--
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
15 years, 11 months