[Hibernate-JIRA] Created: (HHH-7002) SchemaExport ERROR when using in-memory database (H2) - drop constraint issue HHH000389
by andrea handevidt (JIRA)
SchemaExport ERROR when using in-memory database (H2) - drop constraint issue HHH000389
---------------------------------------------------------------------------------------
Key: HHH-7002
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-7002
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.0.1
Environment: H2Dialect, Hibernate 4.0
Reporter: andrea handevidt
Priority: Minor
Attachments: HibernateError.zip
HHH-000389 resolved an issue with property name="hibernate.hbm2ddl.auto" value="create". It now performs a drop prior to create. When using an in-memory database this will throw errors on table with foreign key constraints.
ERROR (SchemaExport:426) - HHH000389: Unsuccessful: alter table security_key drop constraint FK3031A4E0BE21E8D7
ERROR (SchemaExport:427) - Table "SECURITY_KEY" not found; SQL statement:alter table security_key drop constraint FK3031A4E0BE21E8D7
I noticed that the sqlDropString for org.hibernate.mapping.Table appends "if exists". This is missing for org.hibernate.mapping.ForeignKey.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[Hibernate-JIRA] Created: (HV-548) Validation annotation override in class inheritance
by Alex Landini (JIRA)
Validation annotation override in class inheritance
---------------------------------------------------
Key: HV-548
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-548
Project: Hibernate Validator
Issue Type: New Feature
Components: annotation-processor
Affects Versions: 4.2.0.Final
Reporter: Alex Landini
Hibernate validator should provide something like JPA @AttributeOverride to override parent class constraints.
public class A {
@Size(min = 1, max = 10)
private String field1;
@Min(2)
private Integer field2;
...
}
@ConstraintOverrides({
@ConstraintOverride(name="field1", constraint={@Size(min=4, max =20)}),
@ConstraintOverride(name="startDate", constraint={@Min(1)})
})
public class B extends A {
...
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[Hibernate-JIRA] Created: (ANN-469) bulk update with native sql queries
by Amir Pashazadeh (JIRA)
bulk update with native sql queries
-----------------------------------
Key: ANN-469
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-469
Project: Hibernate Annotations
Type: Improvement
Components: binder
Versions: 3.2.0.ga
Reporter: Amir Pashazadeh
Priority: Critical
Hibernate Annotations 3.2 does not support bulk update/deletes using native queries,
if I have something like:
@NamedNativeQuery(name = "testQuery", query = "delete from tb_test where id = ?")
in one of my entities, there will be following exception during build of SessionFactory :
Exception in thread "main" org.hibernate.cfg.NotYetImplementedException: Pure native scalar queries are not yet supported
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:118)
at org.hibernate.cfg.annotations.QueryBinder.bindNativeQueries(QueryBinder.java:197)
at org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:281)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:404)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:452)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:268)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210)
------
I made a mistake and I reported this issue as HHH-2147 as an issue about Hibernate core! :(
--
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
11 years, 11 months
[Hibernate-JIRA] Created: (OGM-151) Reduce memory consumption by sharing the metadata information of Key objects
by Emmanuel Bernard (JIRA)
Reduce memory consumption by sharing the metadata information of Key objects
----------------------------------------------------------------------------
Key: OGM-151
URL: https://hibernate.onjira.com/browse/OGM-151
Project: Hibernate OGM
Issue Type: Improvement
Components: core
Reporter: Emmanuel Bernard
Today EntityKey, AssociationKey, RowKey are composed of a metadata part (table name and column names) and a data part (column values).
Besides, AssociationKey also embeds collection role and owner's EntityKey.
We could have a model where Key object receive a KeyMetadata object whose instances is shared and kept in Persister/Loader. This will reduce memory consumption.
We can in addition consider putting non identifier metadata in a separate object (collection role and entity key owner information) and pass this object to the GridDialect. This object could even be specialized per datastore based on specific metadata hosted on entity / associations.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[Hibernate-JIRA] Created: (OGM-150) memory consumption of AssociationKey
by Sanne Grinovero (JIRA)
memory consumption of AssociationKey
------------------------------------
Key: OGM-150
URL: https://hibernate.onjira.com/browse/OGM-150
Project: Hibernate OGM
Issue Type: Improvement
Reporter: Sanne Grinovero
Each AssociationKey is containing several fields which are related to the specific Role of the collection, and could be wrapped in a single object reusable for the specific role.
We could avoid exposing this object from the AssociationKey interface, so that the specific Dialect can define custom metadata.
Goals:
- reuse the object instances
- make sure that AssociationKey instances, which are potentially as many as the association instances in some configurations (not using custom serialization), have the minimum number of fields defined.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[Hibernate-JIRA] Created: (HHH-5855) The method "merge" from the EntityManager causes a duplicated "insert" of a child entity.
by Seth Martin (JIRA)
The method "merge" from the EntityManager causes a duplicated "insert" of a child entity.
-----------------------------------------------------------------------------------------
Key: HHH-5855
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5855
Project: Hibernate Core
Issue Type: Bug
Components: annotations, core, entity-manager
Affects Versions: 3.6.0, 3.3.1
Environment: Hibernate-Core 3.6.0, Hibernate EntityManager 3.6.0, Derby, Spring 3.0.5 (Configuration), JUnit 4.5
Reporter: Seth Martin
Priority: Critical
Attachments: CascadeMergeTest.zip
The method "merge" from the EntityManager causes a duplicated "insert" of a child entity.
Related to HHH-3332
h3.Observed Behavior:
When you have an Entity A with a OneToMany(fetch=LAZY, cascade=ALL or (MERGE and PERSIST)) relationship to another Entity B and attempt to add an new B instance to A hibernate will generate a duplicate insert command upon commit.
I have witnessed this problem occurring when this procedure is followed:
# retrieve an instance of A from persistence (A a = em.find(A.class, id))
# add a new B to A (a.getBs.add(new B()))
# merge instance 'a' back into persistence (em.merge(a))
Upon transaction commit hibernate will generate an additional "insert" statement and insert the new instance of b into the data source twice.
h3.Expected behavior:
I would expect hibernate to only perform a single insertion when 'a' is merged back to persistence and the B's are created through the cascade.
h3.Notes (Discoveries):
This problem can be worked around by:
* Changing the OneToMany relationship from a List to a Set
* Only using either Cascade MERGE or PERSIST not both of ALL
* Add a new B to A.getBs by adding to the '0' index (a.getBs.add(0,new B()))
--
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
11 years, 11 months
[Hibernate-JIRA] Created: (HHH-2171) Transaction Rollback Problem in GA due to jboss cache alpha dependency
by bhumika thakkar (JIRA)
Transaction Rollback Problem in GA due to jboss cache alpha dependency
----------------------------------------------------------------------
Key: HHH-2171
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2171
Project: Hibernate3
Type: Bug
Components: build
Versions: 3.2.0.ga
Reporter: bhumika thakkar
We upgraded to Hibernate GA, and started getting Transaction Rolloback Exception. GA release is distributed with JBoss cache alpha quality dependency. Upgrading to the current production release of it fixes the issue.
Stack trace:
org.jboss.cache.interceptors.TxInterceptor.runRollbackPhase Rollback had
a problem
java.lang.IllegalStateException: local transaction Transaction[]
transaction does not match running tx null
at
org.jboss.cache.interceptors.TxInterceptor.handleCommitRollback(TxInterc
eptor.java:616)
at
org.jboss.cache.interceptors.TxInterceptor.runRollbackPhase(TxIntercepto
r.java:696)
at
org.jboss.cache.interceptors.TxInterceptor$RemoteSynchronizationHandler.
afterCompletion(TxInterceptor.java:947)
at
org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompleti
on(OrderedSynchronizationHandler.java:80)
at
com.caucho.transaction.TransactionImpl.callAfterCompletion(TransactionIm
pl.java:893)
at
com.caucho.transaction.TransactionImpl.commit(TransactionImpl.java:713)
at
com.caucho.transaction.TransactionManagerImpl.commit(TransactionManagerI
mpl.java:263)
at
com.caucho.jca.UserTransactionImpl.commit(UserTransactionImpl.java:411)
at
com.caucho.jca.UserTransactionProxy.commit(UserTransactionProxy.java:142
)
at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTr
ansactionManager.java:787)
at
org.springframework.transaction.support.AbstractPlatformTransactionManag
er.processCommit(AbstractPlatformTransactionManager.java:500)
at
org.springframework.transaction.support.AbstractPlatformTransactionManag
er.commit(AbstractPlatformTransactionManager.java:473)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.doC
ommitTransactionAfterReturning(TransactionAspectSupport.java:267)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo
pProxy.java:176)
at $Proxy119.executeCallback(Unknown Source)
...
--
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
11 years, 11 months