[Hibernate-JIRA] Created: (HHH-6041) Logging in catch block
by Ondrej Motlik (JIRA)
Logging in catch block
----------------------
Key: HHH-6041
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6041
Project: Hibernate Core
Issue Type: Improvement
Components: entity-manager
Affects Versions: 3.5.3
Reporter: Ondrej Motlik
I have experienced very unpleasant problem in live environment where UnsupportedOperationException appeared. It was caused by calling rollback method which is not implemented (HHH-5019). But the cause of exception was hidden in log files, because of following code:
public RuntimeException convert(RuntimeException e) {
RuntimeException result = e;
if ( e instanceof HibernateException ) {
result = convert( ( HibernateException ) e );
}
else {
markAsRollback();
}
return result;
}
My suggestion is to add in else part logger. It will do no harm and it will possible to see cause of problem in log file especially in environments where manual debugging is not possible. Thanks in advance.
--
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
15 years, 1 month
[Hibernate-JIRA] Issue Comment Edited: (HHH-879) Enable joining the same association twice with Criteria
by guruofse (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-879?page=co... ]
guruofse edited comment on HHH-879 at 3/23/11 2:17 AM:
-------------------------------------------------------
Hi Aryan,
I am newbie in Hibernate detached criteria query. During googling of my problem I come across to your post, I have just slight different problem then Scott Haynie.
Could you please tell me what should be the Detached criteria code to achieve query like below?
select a.col1, b.col1, count(c.col1)
from TableA a
right outer join (TableB b, TableC c) on a.ID=b.A_ID and a.ID=c.A_ID
where b.col='oneval' and c.col='anotherval'
group by a.col1
Many thanks in advance
was (Author: guruofse):
Hi Aryan,
I am newbie in Hibernate detached criteria query. During googling of my problem I come across to your post, I have just slight different problem then Scott Haynie.
Could you please tell me what should be the Detached criteria code to achieve query like below?
select a.col1, b.col1, count(c.col1)
from TableA a
right outer join (TableB b, TableC c) on a.ID=b.A_ID and a.ID=c.A_ID
where b.col='oneval' and c.col='anotherval'
group by a.col1
> Enable joining the same association twice with Criteria
> -------------------------------------------------------
>
> Key: HHH-879
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-879
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Reporter: Vladimir Bayanov
>
> Make double joining the same association with Criteria.createCriteria possible. See: http://forum.hibernate.org/viewtopic.php?t=931249
--
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
15 years, 1 month
[Hibernate-JIRA] Created: (HHH-4999) createSQLQuery(query).list() result screw up when when columns in different tables have same name
by thogau (JIRA)
createSQLQuery(query).list() result screw up when when columns in different tables have same name
-------------------------------------------------------------------------------------------------
Key: HHH-4999
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4999
Project: Hibernate Core
Issue Type: Bug
Components: query-sql
Affects Versions: 3.5.0-CR-2
Environment: hibernate-core 3.5.0-CR-2
MySQL 5
Reporter: thogau
Attachments: joinProblem.zip
The same SQL query doesn't retrieve the same results with hibernate and SQL client :
{{SELECT groupe.name, center.name, roles.displayname, users.username, CASE WHEN center.id = 2 THEN 1 ELSE 0 END AS showlast
FROM groupe, center, users, roles WHERE users.role_id = roles.id AND users.center_id = center.id
AND center.group_id = groupe.id ORDER BY showlast, groupe.sitecoordinateur DESC, groupe.name, center.headcenter DESC, center.name, roles.id}}
When performed with hibernate, *group.name* is retrieved twice (*center.name* is always the same as *group.name*).
Still, it is possible to retrieve the correct value for *center.name* using *CONCAT('', center.name)*
A small eclipse + maven projet with unit test is attached.
--
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
15 years, 1 month
[Hibernate-JIRA] Created: (HHH-6035) @Index annotation ommitted while creating audit tables
by Lukasz Antoniak (JIRA)
@Index annotation ommitted while creating audit tables
------------------------------------------------------
Key: HHH-6035
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6035
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 4.0.0.Alpha1
Environment: All, Tested on Oracle 10g
Reporter: Lukasz Antoniak
Priority: Minor
Assume audited entity configured as follows:
{code:title=Address.java|borderStyle=solid}
@Entity
@Table(appliesTo = "Address", indexes = { @Index(name="idx", columnNames = { "streetName", "houseNumber" } ) } )
public class Address {
@Id
@GeneratedValue
private int id;
@Audited
private String streetName;
@Audited
private Integer houseNumber;
@Audited
private Integer flatNumber;
...
}
{code}
The table {{ADDRESS_AUD}} is being created without any index on columns {{streetName}} and {{houseNumber}} (corresponding to original index {{idx}}).
Verify the correctness of applying [@Index|http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/annotations/Index.html] annotation on fields and methods.
In my opinion two additional configuration parameters shall be added, since only one index structure with the given name can exist in a single database schema.
Bug report on Hibernate Envers forum: [http://community.jboss.org/thread/163497?tstart=0].
--
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
15 years, 1 month