[Hibernate-JIRA] Created: (METAGEN-38) Attribute not generated for Blob type fields
by Stu White (JIRA)
Attribute not generated for Blob type fields
--------------------------------------------
Key: METAGEN-38
URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-38
Project: Hibernate Metamodel Generator
Issue Type: Bug
Affects Versions: 1.0.0-CR-1
Environment: Hibernate 3.5.3-Final, Oracle DB
Reporter: Stu White
Assignee: Hardy Ferentschik
Attachments: test-case.zip
Hi,
I've got a class with a field of type java.sql.Blob, and it appears that the Hibernate Metamodel generator is ignoring this field when generating the metamodel. Other fields are generated correctly.
The class in question looks like:
{code:title=BlobEntity.java|borderStyle=solid}
@Entity
@Table(name = "BlobEntity", schema = "Repository")
public class BlobEntity
{
@Id
@Column(name = "blob_id")
private String mId;
@Lob
@Column(name = "blob_value", insertable = false, updatable = false)
private Blob mBlob;
/// Etc
{code}
The generated metamodel looks like:
{code:title=BlobEntity_.java|borderStyle=solid}
@StaticMetamodel(BlobEntity.class)
public abstract class BlobEntity_ {
public static volatile SingularAttribute<BlobEntity, String> mId;
}
{code}
Admittedly, generating an attribute for a Blob field isn't particularly useful because we don't want to search against this field. However, Hibernate seems to generates a warning about this missing field ("Unable to locate static metamodel field ... ") at startup, and spec (http://docs.jboss.org/hibernate/jpamodelgen/1.0/reference/en-US/html_single/) seems to suggest that a field should be generated.
I've attached a test case to reproduce, but it's pretty trivial. If you need any further information or if there's anything I can do then please let me know.
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-5560) Envers ValidAuditTimeStrategy needs a better name
by Erik-Berndt Scheper (JIRA)
Envers ValidAuditTimeStrategy needs a better name
-------------------------------------------------
Key: HHH-5560
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5560
Project: Hibernate Core
Issue Type: Improvement
Components: envers
Affects Versions: 3.6.0.Beta4
Reporter: Erik-Berndt Scheper
Priority: Minor
See: http://community.jboss.org/thread/156343?tstart=0
I have been thinking about this some time, but I believe we need a better name for the ValidAuditTimeStrategy.
Of course, this affects both the class name and the envers configuration option.
I think we need to do this ASAP (before 3.6.0 goes CR or even GA), because it will cause less incompatibility issues.
We could keep the old configuration option for compatibility reasons, but that may not be necessary since you marked this as experimental.
There are a couple of reasons why I dislike this name
* It suggests that AuditTimes can be invalid. I cannot image how this could be the case.
* We already have AuditStrategy and DefaultAuditStrategy. So it would we logical that the name should end with AuditStrategy.
* The strategy is based on the use of a revision end column, not on anything like time(stamp)s.
I propose to rename this strategy to RevisionEndColumnAuditStratigy.
What do you think? If you agree, I could create an issue with a patch to fix this.
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-2917) arithmatic of subselect throws NPE
by John Aylward (JIRA)
arithmatic of subselect throws NPE
----------------------------------
Key: HHH-2917
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2917
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5
Annotation 3.3.0
VAlidator 3.0.0
MySQL 5.0.44
Reporter: John Aylward
Exception Stack:
java.lang.NullPointerException
at org.hibernate.hql.ast.tree.BinaryArithmeticOperatorNode.getRightHandOperand(BinaryArithmeticOperatorNode.java:185)
at org.hibernate.hql.ast.tree.BinaryArithmeticOperatorNode.initialize(BinaryArithmeticOperatorNode.java:20)
at org.hibernate.hql.ast.HqlSqlWalker.prepareArithmeticOperator(HqlSqlWalker.java:1011)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.arithmeticExpr(HqlSqlBaseWalker.java:2729)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1278)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4041)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3600)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1690)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1687)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
HQL:
[SELECT DISTINCT pi.billingAccount.consolidatedBillingAccount.bankAccount FROM com.cicat.bedrock.billing.model.ProviderInvoice AS pi WHERE pi.readyForPayment=true AND (SELECT piad.total FROM com.cicat.bedrock.billing.model.ProviderInvoiceAccountData AS piad WHERE piad.invoice = pi AND piad.providerBillingAccount = pi.billingAccount) > ((SELECT COALESCE(SUM(amount),0) FROM com.cicat.bedrock.billing.model.BankAccountTransaction AS bat1 WHERE bat1.deleted=false AND bat1.providerInvoice = pi) + (SELECT COALESCE(SUM(amount),0) FROM com.cicat.bedrock.billing.model.BankAccountTransactionSplit AS bats1 WHERE bats1.deleted=false AND bats1.bankAccountTransaction.deleted=false AND bats1.providerInvoice = pi)) ]
Representative SQL of HQL call:
SELECT DISTINCT ba.* from ProviderInvoice AS pi
INNER JOIN ProviderBillingAccount AS pba ON pi.billingAccount_id=pba.id
INNER JOIN ConsolidatedBillingAccount AS cba ON pba.consolidatedBillingAccount_id=cba.id
INNER JOIN BankAccount AS ba ON cba.bankAccount_id=ba.id
WHERE
pi.readyForPayment=true AND
(SELECT piad.total FROM ProviderInvoiceAccountData AS piad WHERE piad.invoice_id = pi.id AND piad.providerBillingAccount_id = pi.billingAccount_id)
>
((SELECT COALESCE(SUM(bat1.amount),0) FROM BankAccountTransaction AS bat1 WHERE bat1.deleted=false AND bat1.providerInvoice_id = pi.id)
+
(SELECT COALESCE(SUM(bats1.amount),0) FROM BankAccountTransactionSplit AS bats1 INNER JOIN BankAccountTransaction bat2 ON bats1.bankAccountTransaction_id=bat2.id WHERE bats1.deleted=false AND bat2.deleted=false AND bats1.providerInvoice_id = pi.id))
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-5591) ConcurrentStatisticsImpl#queryExecuted() does not update queryExecutionMaxTimeQueryString
by Cédrik LIME (JIRA)
ConcurrentStatisticsImpl#queryExecuted() does not update queryExecutionMaxTimeQueryString
-----------------------------------------------------------------------------------------
Key: HHH-5591
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5591
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0.CR1, 3.5.6
Reporter: Cédrik LIME
Priority: Minor
The new (3.5.0) concurrent statistics classes broke the logging of the longest query.
Path to make it work again:
in {{ConcurrentStatisticsImpl#public void queryExecuted(String hql, int rows, long time)}}
replace
{code:java|title=ConcurrentStatisticsImpl#queryExecuted()}
for ( long old = queryExecutionMaxTime.get();
( time > old ) && ( isLongestQuery = !queryExecutionMaxTime.compareAndSet( old, time ) );
old = queryExecutionMaxTime.get() ) {
// nothing to do here given the odd loop structure...
}
{code}
with
{code:java|title=ConcurrentStatisticsImpl#queryExecuted()}
for ( long old = queryExecutionMaxTime.get();
( isLongestQuery = time > old ) && ( !queryExecutionMaxTime.compareAndSet( old, time ) );
old = queryExecutionMaxTime.get() ) {
// nothing to do here given the odd loop structure...
}
{code}
--
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
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-5581) hibernate_sequence lookup error
by Frank Langelage (JIRA)
hibernate_sequence lookup error
-------------------------------
Key: HHH-5581
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5581
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.5
Environment: JBoss-6.0.0-SNAPSHOT (current svn checkout), Informix 11.5 Database, SUN JDK 1.6.0_21
Reporter: Frank Langelage
On startup of JBossAS I see this in the boot.log file:
17:53:43,896 INFO [DatabaseMetadata] table not found: hibernate_sequence
17:53:43,898 ERROR [SchemaUpdate] could not complete schema update: org.hibernate.MappingException: Dialect does not support pooled sequences
at org.hibernate.dialect.Dialect.getCreateSequenceString(Dialect.java:734) [:3.5.5-Final]
at org.hibernate.dialect.Dialect.getCreateSequenceStrings(Dialect.java:692) [:3.5.5-Final]
at org.hibernate.id.enhanced.SequenceStructure.sqlCreateStrings(SequenceStructure.java:156) [:3.5.5-Final]
at org.hibernate.id.enhanced.SequenceStyleGenerator.sqlCreateStrings(SequenceStyleGenerator.java:363) [:3.5.5-Final]
at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:1142) [:3.5.5-Final]
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:187) [:3.5.5-Final]
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:386) [:3.5.5-Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385) [:3.5.5-Final]
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954) [:3.5.5-Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891) [:3.5.5-Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [:3.5.5-Final]
at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-1]
at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.0.0-SNAPSHOT]
at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-1]
I created the sequence manually but during next startup the same error message.
I enabled the logging of database statements and found this:
QUERY: (OPTIMIZATION TIMESTAMP: 09-19-2010 17:53:43)
------
select tabname, tabtype, owner, tabid from jboss6:informix.systables where tabtype in ('T','V') and tabname like 'hibernate_sequence' and owner like '%'
Estimated Cost: 10
Estimated # of Rows Returned: 3
1) informix.systables: SEQUENTIAL SCAN
Filters: ((informix.systables.tabtype IN ('T' , 'V' )AND informix.systables.tabname LIKE 'hibernate_sequence' ) AND informix.systables.owner LIKE '%' )
Hibernate is looking for a table or view named "hibernate_sequence" and not for a sequence of this name.
--
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
13 years, 8 months