[Hibernate-JIRA] Created: (HHH-4862) column name quoting not properly handled for javax.persistence.ColumnResult
by Steve Ebersole (JIRA)
column name quoting not properly handled for javax.persistence.ColumnResult
---------------------------------------------------------------------------
Key: HHH-4862
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4862
Project: Hibernate Core
Issue Type: Bug
Components: core, query-sql
Affects Versions: 3.5.0-Beta-3
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.5.0-Beta-4
A quoted column name specified in @javax.persistence.ColumnResult is not properly handled during "type auto-detection" leading to errors like:
{noformat}
org.hibernate.HibernateException: Could not resolve column name in result set [`INAME`]
at org.hibernate.loader.custom.CustomLoader$Metadata.resolveColumnPosition(CustomLoader.java:567)
at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(CustomLoader.java:507)
at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:526)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1836)
at org.hibernate.loader.Loader.doQuery(Loader.java:714)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2249)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2146)
at org.hibernate.loader.Loader.list(Loader.java:2141)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:314)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1832)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:176)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:226)
{noformat}
--
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
16 years, 2 months
[Hibernate-JIRA] Created: (HHH-4850) regression, we are no longer throwing PessimisticLockException as required by the JPA-2 spec
by Scott Marlow (JIRA)
regression, we are no longer throwing PessimisticLockException as required by the JPA-2 spec
---------------------------------------------------------------------------------------------
Key: HHH-4850
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4850
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.0-Beta-3
Reporter: Scott Marlow
Assignee: Scott Marlow
Priority: Blocker
Fix For: 3.5.0-Beta-4
It looks like the fix for HHH-4806 caused this to regress.
3.4.4.2
"
When an application locks an entity with LockModeType.PESSIMISTIC_READ and later updates
that entity, the lock must be converted to an exclusive lock when the entity is flushed to the database[42].
If the lock conversion fails, and the database locking failure results in transaction-level rollback, the
provider must throw the PessimisticLockException and ensure that the JTA transaction or
EntityTransaction has been marked for rollback. When the lock conversion fails, and the database lock-
ing failure results in only statement-level rollback, the provider must throw the LockTimeoutEx-
ception (and must not mark the transaction for rollback).
"
--
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
16 years, 2 months
[Hibernate-JIRA] Created: (HSEARCH-450) Example 1.9. superfluous hibernate word
by Dmitriy Fundak (JIRA)
Example 1.9. superfluous hibernate word
---------------------------------------
Key: HSEARCH-450
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-450
Project: Hibernate Search
Issue Type: Bug
Components: documentation
Affects Versions: 3.2.0.Beta1
Reporter: Dmitriy Fundak
Priority: Minor
Example 1.9, org.hibernate.hibernate should be org.hibernate.
EntityManager em = entityManagerFactory.createEntityManager();
FullTextEntityManager fullTextEntityManager =
org.*hibernate.hibernate*.search.jpa.Search.getFullTextEntityManager(em);
em.getTransaction().begin();
// create native Lucene query
String[] fields = new String[]{"title", "subtitle", "authors.name", "publicationDate"};
MultiFieldQueryParser parser = new MultiFieldQueryParser(fields, new StandardAnalyzer());
org.apache.lucene.search.Query query = parser.parse( "Java rocks!" );
// wrap Lucene query in a javax.persistence.Query
javax.persistence.Query persistenceQuery = fullTextEntityManager.createFullTextQuery(query, Book.class);
// execute search
List result = persistenceQuery.getResultList();
em.getTransaction().commit();
em.close();
--
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
16 years, 2 months
[Hibernate-JIRA] Created: (HHH-4863) Hibernate - ORA-01024: invalid datatype in OCI call
by Jan Michael (JIRA)
Hibernate - ORA-01024: invalid datatype in OCI call
---------------------------------------------------
Key: HHH-4863
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4863
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: Hibernate 3.3.2 GA, Oracle 8.0.5 Enterprise Edition
Reporter: Jan Michael
Hi Hibernate,
I recently tried hibernate in Oracle 9i and use the same in Oracle 8i, however when I tried the same settings I am getting a ORA-01024: invalid datatype in OCI call.
Bellow are my hbm settings:
<class name="SimpleVO" table="REGISTRATION">
<id name="userId" type="string" column="USER_ID" />
<property name="userName" type="string" column="USER_NAME" />
<property name="regDate" type="timestamp" column="REG_DATE" />
</class>
Bellow is my VO class:
import java.util.Date;
public class SimpleVO {
private String userId;
private String userName;
private Date regDate;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Date getRegDate() {
return regDate;
}
public void setRegDate(Date regDate) {
this.regDate = regDate;
}
}
Below is my client class:
manifest = new ManifestVO();
manifest.setUserId("01ABC");
manifest.setUserName("test_user");
manifest.setRegDate(new Date());
Session session = HibernateManager.getSession();
session.save(manifest);
session.getTransaction().commit();
HibernateManager.closeSession(session);
Here is the field Type in My Oracle 8i:
Name: Type:
REG_DATE DATE
The following settings works in Oracle 9i but not in Oracle 8i. I tried to set the hbm type to = java.util.Date but I get the same error. I also tried to set the hbm type to string but it inserts an empty string in the database for the date field. Please help as this limits my capability to use hibernate in ORACLE 8 platform.
Thank you.
Cordially,
Jan
--
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
16 years, 2 months
[Hibernate-JIRA] Created: (HHH-3828) Criteria: Restriction whith class does not work
by Kai Prünte (JIRA)
Criteria: Restriction whith class does not work
-----------------------------------------------
Key: HHH-3828
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3828
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.3.1
Environment: Oracle, HSQLDB
Reporter: Kai Prünte
The following line does not work:
Restrictions.eq("class", Bike.class)
because
SingleTableEntityPersister.getDiscriminatorSQLValue()
returns the discriminator value quoted with single quotes. However JDBC needs the string without quotes.
Workaround:
Restrictions.eq("class", Bike.class.getName())
This works fine for the default discriminator values
Patch in CriteriaQueryTranslator.getTypedValue(Criteria subcriteria, String propertyName, Object value):
if(stringValue != null && stringValue.length() > 2 && stringValue.startsWith("'") && stringValue.endsWith("'") ) {
// remove the single quotes
stringValue = stringValue.substring(1, stringValue.length() - 1);
}
--
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
16 years, 2 months