[Hibernate-JIRA] Created: (HHH-2891) Query cache fails on many-to-many select
by Oleg Efimov (JIRA)
Query cache fails on many-to-many select
----------------------------------------
Key: HHH-2891
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2891
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.5
Reporter: Oleg Efimov
I have two entities, User and Group, with many-to-many relation:
-------------------------------------------------------------------------------------------------- User.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="test.hibernate">
<class name="User" table="`USER`">
<id name="id" type="long" unsaved-value="null">
<column name="USER_ID" not-null="true"/>
<generator class="native"/>
</id>
<property name="login">
<column name="LOGIN" not-null="true" length="255"/>
</property>
<bag name="groups" table="USER_GROUP" lazy="false" cascade="none">
<key column="USER_ID"/>
<many-to-many class="Group" column="GROUP_ID"/>
</bag>
</class>
</hibernate-mapping>
-------------------------------------------------------------------------------------------------- Group.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="test.hibernate">
<class name="Group" table="`GROUP`">
<id name="id" type="long" unsaved-value="null">
<column name="GROUP_ID" not-null="true"/>
<generator class="native"/>
</id>
<property name="name">
<column name="GROUPNAME" not-null="true" length="100"/>
</property>
<bag name="users" table="USER_GROUP" lazy="true" inverse="true" cascade="all-delete-orphan">
<key column="GROUP_ID"/>
<many-to-many class="User" column="USER_ID"/>
</bag>
</class>
<query name="Group.select.by.login" cacheable="true"><![CDATA[
select user.groups from User user where user.login=?
]]>
</query>
</hibernate-mapping>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test.hibernate.User and test.hibernate.Group classes are just simple beans.
In Group.hbm.xml there is a query called "Group.select.by.login", it's intended to be cached. So I add corresponding properties to Hibernate configuraition:
--------------------------------------------------------------------------------------------------
properties.put("hibernate.cache.provider_class", "org.hibernate.cache.EhCacheProvider");
properties.put("hibernate.cache.use_query_cache", "true");
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configuration has no extra parameters.
Then I'm trying to execute the query two times:
-------------------------------------------------------------------------------------------------- test fragment
SessionFactory sessionFactory = configuration.buildSessionFactory();
Session session = null;
try {
session = sessionFactory.openSession();
Query query = session.getNamedQuery("Group.select.by.login");
List<Group> groups;
groups = query.setParameter(0, "admin").list(); // +++++++++++++++This list() returns list of two Group objects, ok +++++++++++++++
System.out.println("-----------------------------------------------------------------------------------");
for (Group group : groups) {
System.out.println(group.getName());
}
System.out.println("-----------------------------------------------------------------------------------");
groups = query.setParameter(0, "admin").list(); // +++++++++++++++This list() returns list of two nulls +++++++++++++++
System.out.println("-----------------------------------------------------------------------------------");
for (Group group : groups) {
System.out.println(group.getName());
}
System.out.println("-----------------------------------------------------------------------------------");
} finally {
if (session != null) {
session.close();
}
sessionFactory.close();
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The first query returns list of, in my case, two groups. The second query returns list of two nulls instead of the same list.
I've investigated the problem, and found the following:
Query return value is "user.groups", and during query analysis (org.hibernate.hql.ast.QueryTranslatorImpl:160) query return type is defined as "org.hibernate.type.BagType(test.hibernate.User.groups)". This seems to be the problem, as during query put operation org.hibernate.CollectionType.disassemble is called (org.hibernate.cache.StandardQueryCache:80), which simply returns null as owner is null.
If this query is not a misuse, then I think, something is to be done at the time of analysis, so that return type be somewhat different.
Thanks.
--
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
12 years, 1 month
[Hibernate-JIRA] Created: (HHH-2223) BatchFetchQueue.getXXXBatch() cache check impeding batch fetching
by Joel Caplin (JIRA)
BatchFetchQueue.getXXXBatch() cache check impeding batch fetching
-----------------------------------------------------------------
Key: HHH-2223
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2223
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.ga
Environment: 3.2.0GA, Mac OS X/Solaris 10, Sybase 12.5/HSQLDB
Reporter: Joel Caplin
Priority: Minor
Attachments: testcase.tar
I have attached a test case which demonstrates the issue at hand by implementing a cheap data model: Pub >---|- Manager -|--< Employee
Pub and Employee are uncached; Manager is cached (tried under both Eh and the non-prod HashMap implementation). All associations are lazy. The test case has a default batch size of 10 and uses hsqldb to demonstrate the problem - which was diagnosed against Sybase.
When BatchFetchQueue.getXXXBatch() is invoked, it does not load any objects it finds in the second level cache - it merely acknowledges their presence by logging to INFO (isCached()). This in turn means that any child associations in that cached object will not have a proxy created for them.
Suppose we want to find all the employees of the pubs in our database. We choose to do this by loading all the Pubs ("FROM Pub") and calling thePub.getManager().getEmployees() iteratively.
When the managers are in the second level cache, Hibernate issues 11 select statements: one to load the pubs and one for each distinct manager.
When the Managers are not in the cache, Hibernate issues 3 select statements: one to load the pubs, one to load the managers and one to load the employees.
A solution might be to load the object from the cache instead of just ignoring it?
--
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
12 years, 1 month
[Hibernate-JIRA] Created: (HHH-3032) On Sybase, a subquery is incorrectly generated, causing ''Incorrect syntax near the keyword 'as'.
by Fernando Galdino (JIRA)
On Sybase, a subquery is incorrectly generated, causing ''Incorrect syntax near the keyword 'as'.
-------------------------------------------------------------------------------------------------
Key: HHH-3032
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3032
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5, JDK 1.6, IDE Eclipse 3.3, running on Windows XP
Reporter: Fernando Galdino
I am using Spring 2.5 and Hibernate. I created a method to find a list of ProductPositionData based on an existence of its details represented by class DetalhePosicaoProdutoData. So, there is a relationship 1:n between tables ProductPosition and DetalhePosicaoProduto.
public List<ProductPositionData> findAllBy(Date date, String viewCode, String status)
{
DetachedCriteria subquery = DetachedCriteria.forClass(DetalhePosicaoProdutoData.class);
subquery.add(Expression.eq("indSituaRegis", status));
subquery.add(Expression.eq("compositeId.datPosic", date));
subquery.setProjection(Projections.distinct(Property.forName("tipDolar")));
DetachedCriteria criteria = DetachedCriteria.forClass(ProductPositionData.class);
criteria.add(Expression.eq("indSituaRegis", status));
criteria.add(Subqueries.exists(subquery));
List<ProductPositionData> list = this.hibernateTemplate.findByCriteria(criteria);
return list;
}
It should generate a query on the format SELECT blablabla FROM xyz WHERE exists (SELECT 1 FROM wyz). In really, running this method, I got a similar query.
select [ommitted field names]
from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_
where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as y0_
from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?)
It causes the following error running under Sybase:
Incorrect syntax near the keyword 'as'.
; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'.
It happens because on the subquery is generated this0__.tip_dolar as y0_ but "as y0_" is not valid in Sybase because using alias is not allowed for Sybase subqueries.
I saw similar problems at:
http://forum.hibernate.org/viewtopic.php?t=949233
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2905
-----------------------------------
Stacktrace:
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.tip_orige_opera as tip1_4_0_, this_.num_opera as num2_4_0_, this_.ind_ativo_passi as ind3_4_0_, this_.tip_posic_opera as tip4_4_0_, this_.num_book as num5_4_0_, this_.num_regra_produ as num6_4_0_, this_.tip_objet_opera as tip7_4_0_, this_.tip_opera as tip8_4_0_, this_.num_empre as num9_4_0_, this_.num_clien as num10_4_0_, this_.ind_tradi as ind11_4_0_, this_.dat_inici_opera as dat12_4_0_, this_.dat_termi_opera as dat13_4_0_, this_.dat_termi_opera_me as dat14_4_0_, this_.dat_venci_risco as dat15_4_0_, this_.val_parid_moeda as val16_4_0_, this_.pcl_taxa_opera as pcl17_4_0_, this_.pcl_sobre_index as pcl18_4_0_, this_.val_cotac_indic_abert as val19_4_0_, this_.cod_risco_index as cod20_4_0_, this_.num_confi_calcu_produ as num21_4_0_, this_.cod_indic_econo_indic as cod22_4_0_, this_.tip_indic_econo_indic as tip23_4_0_, this_.nat_indic_econo_indic as nat24_4_0_, this_.tip_merca_indic_indic as tip25_4_0_, this_.cod_indic_econo_taxa as cod26_4_0_, this_.tip_indic_econo_taxa as tip27_4_0_, this_.tip_merca_indic_taxa as tip28_4_0_, this_.nat_indic_econo_taxa as nat29_4_0_, this_.ind_situa_regis as ind30_4_0_, this_.dat_situa_regis as dat31_4_0_, this_.cod_user as cod32_4_0_, this_.num_carte as num33_4_0_, this_.dat_liqui_opera as dat34_4_0_, this_.cod_indic_econo_taxa_fwd as cod35_4_0_, this_.tip_indic_econo_taxa_fwd as tip36_4_0_, this_.tip_merca_indic_taxa_fwd as tip37_4_0_, this_.nat_indic_econo_taxa_fwd as nat38_4_0_, this_.dat_limit_varia_indic as dat39_4_0_, this_.tip_metod_preci as tip40_4_0_, this_.tip_estru_sinte as tip41_4_0_, this_.dat_entra_opera as dat42_4_0_ from dtb_trd_resultado.resu.tbl_posicao_produto_trd this_ where this_.ind_situa_regis=? and exists (select distinct this0__.tip_dolar as y0_ from dtb_trd_resultado.resu.tbl_det_posicao_produto_trd this0__ where this0__.ind_situa_regis=? and this0__.dat_posic=?)]; SQL state [ZZZZZ]; error code [156]; Incorrect syntax near the keyword 'as'.
; nested exception is com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'.
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:121)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:378)
at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:981)
at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:974)
at com.jpmorgan.br.databroker.control.productposition.ProductPositionControlImpl.findAllByx(ProductPositionControlImpl.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy5.findAllByx(Unknown Source)
at com.jpmorgan.br.databroker.control.productposition.ProductPositionDataProvider.getData(ProductPositionDataProvider.java:32)
at com.jpmorgan.br.databroker.service.OptPriceProcessTest.runProcess(OptPriceProcessTest.java:109)
at com.jpmorgan.br.databroker.service.OptPriceProcessTest.testProcess(OptPriceProcessTest.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near the keyword 'as'.
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:3178)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2481)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203)
at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1611)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1596)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:96)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at org.springframework.orm.hibernate3.HibernateTemplate$35.doInHibernate(HibernateTemplate.java:991)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:373)
... 35 more
--
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
12 years, 2 months
[Hibernate-JIRA] Created: (HHH-2280) Not-Null Constraint-Violation with unidirectional one-to-many mapping
by Robert Herschke (JIRA)
Not-Null Constraint-Violation with unidirectional one-to-many mapping
---------------------------------------------------------------------
Key: HHH-2280
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2280
Project: Hibernate3
Type: Bug
Versions: 3.2.0.cr4
Environment: Hibernate 3.2.0.cr4, Oracle 10XE
Reporter: Robert Herschke
Priority: Blocker
Attachments: one-to-many-test.zip
In some cases it is neccessary to have an unidirectional one-to-many mapping, but not using Join-Tables due to a legacy database system.
So it must be possible, to have a one-to-many mapping just via a foreign-key-mapping. The Child-Object must not know the Parent-Object in this case.
It must also be possible, to pay respect to a NOT-NULL-Constraint at this foreign-key due to restrictions on legacy database systems.
Hibernate doesn't support this, but throw a NOT-NULL-Constraint Violation Exception. The documentation says, "this is unusual" - to which I want to dissent.
See the attached testcase for details, that is adopted from your "one-to-many" testcase found in the 3.2.0 sources.
--
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
12 years, 2 months
[Hibernate-JIRA] Created: (HHH-2697) Can't use := for variable assignment within a SQL-Statement
by Benjamin Gniza (JIRA)
Can't use := for variable assignment within a SQL-Statement
-----------------------------------------------------------
Key: HHH-2697
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2697
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.4.sp1
Environment: MySQL Datasource, Hibernate 3.2.4.sp1
Reporter: Benjamin Gniza
Priority: Minor
i found a kind of bug in org.hibernate.engine.query.ParameterParser.java:
I have an exotic mysql-statement where I want to use mysql variables.
VERY SIMPLE example:
SET @pos=0;
SELECT @pos:=@pos+1 FROM TABLE;
Steps to reproduce:
Session s = sessionFactory.openSession();
s.createSQLQuery("SET @pos=0").executeUpdate();
SQLQuery qry = s.createSQLQuery("select @pos:=@pos from SomeTable");
List lst = qry.list();
Exception:
org.hibernate.QueryException: Space is not allowed after parameter prefix ':' 'SELECT @pos:=@pos+1 FROM TABLE'
at org.hibernate.engine.query.ParameterParser.parse(ParameterParser.java:68)
...
...
Suggested fix:
ParameterParser Lines 62 to 73:
if (c == ':' && (indx + 1 >= stringLength || sqlString.charAt(indx + 1) != '=')) {
// named parameter
int right = StringHelper.firstIndexOfChar( sqlString, ParserHelper.HQL_SEPARATORS, indx + 1 );
int chopLocation = right < 0 ? sqlString.length() : right;
String param = sqlString.substring( indx + 1, chopLocation );
if ( StringHelper.isEmpty( param ) ) {
throw new QueryException("Space is not allowed after parameter prefix ':' '"
+ sqlString + "'");
}
recognizer.namedParameter( param, indx );
indx = chopLocation - 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
12 years, 2 months
[Hibernate-JIRA] Created: (HHH-2165) Change logging level in TableMetadata from INFO to DEBUG or TRACE
by Igor A Tarasov (JIRA)
Change logging level in TableMetadata from INFO to DEBUG or TRACE
-----------------------------------------------------------------
Key: HHH-2165
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2165
Project: Hibernate3
Type: Improvement
Components: metamodel
Versions: 3.2.0.ga
Reporter: Igor A Tarasov
TableMetadata produce too many output to INFO log level. It good thing if it output be at DEBUG level to not hide other impotant information as service start/stop and other.
20.10.06 18:01:58 INFO [main]: SchemaUpdate - updating schema
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.ChageDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [id, _version, chagedate, created, service, sum, restbalance, comment, customer_id]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, fk8f40c06527214c11, chagedate, primary]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.CustomerDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [phone, firm, group_id, deleted, fio, id, balance, created, updated, address, email, name, comment]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, primary, fk1892e50924b4a799, deleted]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.GroupDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [id, updated, created, name, comment, deleted]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, primary, deleted]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.HostDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [tarif_id, server_id, ips, mac, deleted, id, created, updated, name, lastactive, comment, disabled, customer_id]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [ips, name, primary, fk812f2053f280a3b1, mac, deleted, fk812f205327214c11, fk812f20537f1e2ff9]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.HostSessionDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [id, host_id, starttime, chage, speedou, updatetime, speedin, bytesin, stoptime, bytesou, version]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [fk9a9074b995d39b51, id, primary]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.LoginDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [id, nickname, updated, created, name, comment, password, deleted, customer_id, disabled]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, name, primary, fk77a0599427214c11, deleted]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.PPPAccountDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [tarif_id, login_id, id, server_id, updated, created, comment, deleted, disabled, ip]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, fk507abf087f1e2ff9, primary, fk507abf08f280a3b1, fk507abf08820174d9, deleted]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.PPPSessionDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [callerid, starttime, account_id, updatetime, speedou, chage, speedin, stoptime, bytesou, version, ip, id, ident, bytesin]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, fke19b413144f3fa61, starttime, ident, updatetime, primary, stoptime]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.PaymentDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [id, _version, created, nalichka, sum, paydate, comment, newbalance, customer_id]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, fk7249f0f127214c11, primary, paydate]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.ServerDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [id, updated, created, name, comment, deleted, ip]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, name, primary, deleted, ip]
20.10.06 18:01:58 INFO [main]: TableMetadata - table found: isp.TarifDO
20.10.06 18:01:58 INFO [main]: TableMetadata - columns: [costsizein, resetprepaidsize, prepaidsizerest, moncost, resetprepaidusages, costusage, resetprepaidtime, deleted, prepaidtimemonthly, costtime, prepaidsizemonthly, id, prepaidusagesrest, monthenddate, costsizeou, created, updated, name, prepaidtimerest, prepaidusagesmonthly, comment, customer_id]
20.10.06 18:01:58 INFO [main]: TableMetadata - foreign keys: []
20.10.06 18:01:58 INFO [main]: TableMetadata - indexes: [id, primary, fk7893f6d27214c11, deleted]
20.10.06 18:01:58 INFO [main]: SchemaUpdate - schema update complete
--
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
12 years, 2 months
[Hibernate-JIRA] Created: (ANN-677) Blob is null with Postgresql
by Aaron Luchko (JIRA)
Blob is null with Postgresql
----------------------------
Key: ANN-677
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-677
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.1
Environment: hibernate-3.2.1, hibernate-annotations-3.2.1, postgresql-8.2.5-1.fc7, postgresql-jdbc-8.2.504-1jpp.fc7 and postgresql-8.2-506.jdbc4.jar
Reporter: Aaron Luchko
Attachments: hibPostgresbug.zip
I've found that after a sequence of queries, starting new transactions and clearing the session, a Blob will not be successfully from the database and null will be returned by the InputStream instead. Using the debugger I've followed this into the jdbc code and from what I can tell some message is sent to load the blob but the database replies with an empty set of data which naturally causes the InputStream to read null.
I've attached a test case (sorry, no makefile or pom.xml, I just ran it using eclipse) which, for me, replicates the bug.
Note I've also used hsqldb and mysql and didn't see the bug with them, only postgresql.
thanks,
Aaron
--
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
12 years, 2 months