[Hibernate-JIRA] Created: (HHH-6533) ByteTypeDescriptor is not working properly
by Čedomir Igaly (JIRA)
ByteTypeDescriptor is not working properly
------------------------------------------
Key: HHH-6533
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6533
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.6
Reporter: Čedomir Igaly
Attachments: ByteTypeDescriptor.hbm.xml, ByteTypeDescriptorTest.java, Test.java
Problem: ByteTypeDescriptor is not implemented like type descriptors for other subclasses of java.lang.Number. Instead of simple toString / valueOf pair it is using strange kind of conversion to hex character string. Here is just an example with named query that will convert HQL query
from Test where byteValue=test.Test.TEST_VALUE
into
select id, byteValue from byte_type_descriptor_test where byteValue=aa
(instead of select id, byteValue from byte_type_descriptor_test where byteValue=42)
Since aa is treated like (non-existing) column name, this query will not work.
Suggested solution: implement ByteTypeDescriptor like type descriptors for other java.lang.Number subclasses.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[Hibernate-JIRA] Created: (HHH-6614) Bad performance: audited entity updates (lots of them) with no EntityManager clear
by Adriano Saturno Muniz (JIRA)
Bad performance: audited entity updates (lots of them) with no EntityManager clear
----------------------------------------------------------------------------------
Key: HHH-6614
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6614
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 3.6.6
Environment: Hibernate 3.6.6, Oracle
Reporter: Adriano Saturno Muniz
Attachments: src.zip
I was testing Envers performance.
I created an audited entity Mailmen, with a many-to-many relationship with another audited entyty, Address.
Mailmen has a simple field called register. (and an Address collection, but lets simplify the code)
I just created a new instance of Mailmen and edited it 100.000 times:
configurationOverrides = new HashMap<String, String>();
emf = Persistence.createEntityManagerFactory("jpa", configurationOverrides);
entityManager = emf.createEntityManager();
int MAX_EDITIONS = 1000000;
carteiroDefault = new Mailman();
carteiroDefault.setRegister(64737);
entityManager.persist(carteiroDefault);
for(int i = 1; i <= MAX_EDITIONS; i++) {
entityManager.getTransaction().begin();
carteiroDefault.setRegister(i);
entityManager.getTransaction().commit();
}
It tooks about 6 hours to run this code.
It gets better or worse depending on MAX_EDITIONS, in a non linear way. Bad.
But, if I change the for block to this:
entityManager.getTransaction().begin();
entityManager.find(Mailman.class, carteiroDefault.getId()).setRegister(i);
entityManager.getTransaction().commit();
entityManager.clear();
It tooks 30 minutes.
It gets better or worse depending on MAX_EDITIONS, in a linear way. Much better.
There's no bad performance without Envers in this scenario.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[Hibernate-JIRA] Created: (HSEARCH-913) org.hibernate.search.test.embedded.EmbeddedTest#testEmbeddedToManyInSuperslass fails against MySQL with a constraint violation
by Hardy Ferentschik (JIRA)
org.hibernate.search.test.embedded.EmbeddedTest#testEmbeddedToManyInSuperslass fails against MySQL with a constraint violation
------------------------------------------------------------------------------------------------------------------------------
Key: HSEARCH-913
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-913
Project: Hibernate Search
Issue Type: Bug
Components: tests
Affects Versions: 4.0.0.Alpha2
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Priority: Minor
Fix For: 4.0
{noformat}
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`hibernate`.`productfeature`, CONSTRAINT `FK81EF77272D4C4C2A` FOREIGN KEY (`id`) REFERENCES `productfeature` (`id`))
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
... 57 more
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months