[Hibernate-JIRA] Created: (HHH-6947) Optionally ignore modifications to the non-owning side of relationships
by Michael Rudolf (JIRA)
Optionally ignore modifications to the non-owning side of relationships
-----------------------------------------------------------------------
Key: HHH-6947
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6947
Project: Hibernate Core
Issue Type: New Feature
Components: envers
Affects Versions: 3.6.9
Reporter: Michael Rudolf
The JPA specification requires bidirectional relationships between entities to be implemented using "both an owning side and an inverse (non-owning) side" (§2.9). However, it does not deem this distinction an implementation detail only and, in fact, I have a use case where it is explicitly part of the business model. Unfortunately it then seems that Envers does not support differentiating between the owning side and the inverse of a relationship, since a modification to the relationship will cause a new revision to be generated for both sides instead of just for the owning side. As a consequence, the affected entity at the non-owning side will have a new revision stored in its corresponding version table although no physical but only logical modifications have taken place. In order to ignore these additional revisions, it would then be required to compute the difference to the previous revisions and determine whether physical changes were performed. In general this quickly becomes a complex, error-prone and performance-critical task I would like to avoid. Therefore, in order to be able to expose the distinction between owning side and inverse side of a relationship between entities in the business model, it would be nice to have a new option added to Envers to switch off generating revisions for the non-owning side.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[Hibernate-JIRA] Created: (HHH-2381) Criteria API : Order by Native SQL
by Sami Dalouche (JIRA)
Criteria API : Order by Native SQL
-----------------------------------
Key: HHH-2381
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2381
Project: Hibernate3
Type: Improvement
Components: query-criteria
Reporter: Sami Dalouche
Hi,
It would be nice to be able to specify the ORDER BY clause using Native SQL. (It is currently doable by subclassing the Order class, but some nice solution would allow the order to specify attributes on another table..)
Let's take a simple example : I have a distance("attribute", geometry) function, that is of course, proprietary.
I am quering table A, which I can join to table B to get the "attribute", on which I want to apply my distance() function.
If I create my own Order subclass, and addOrder on the criteria, the distance("attribute, geometry) is going to refer to the main criteria's class mapping.
So, something like addOrder("objectpath.joined", new MyOrder(...)); would be perfect.
What do you think ?
Regards,
Sami Dalouche
--
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, 9 months
[Hibernate-JIRA] Created: (HHH-4489) need method "refresh(String entityName, Object obj)"
by Shilin ZHENG (JIRA)
need method "refresh(String entityName, Object obj)"
----------------------------------------------------
Key: HHH-4489
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4489
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.3.2
Environment: Idependant
Reporter: Shilin ZHENG
Priority: Blocker
We can save, update, merge etc. an object with "entityName", but not refresh().
Exception is :
FROM-------------------
org.hibernate.MappingException: Unknown entity: com.aca.isie.statparam.fonctional.entities.impl.VariableExp
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:548)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:66)
at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:39)
at org.hibernate.impl.SessionImpl.fireRefresh(SessionImpl.java:902)
at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:886)
-------------END
When I read line 66 of source file "DefaultRefreshEventListener", I have noticed that you have commented this:
Line 66: persister = source.getEntityPersister(null, object); //refresh() does not pass an entityName
So will you please correct this so that we can pass an "entityName" in "refresh()"? Thank you. In fact, we are on the last phase of our development and we are blocked on 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
11 years, 9 months
[Hibernate-JIRA] Created: (HHH-6935) HibernateException in mysql Found: bit, expected: boolean
by orasio spieler (JIRA)
HibernateException in mysql Found: bit, expected: boolean
---------------------------------------------------------
Key: HHH-6935
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6935
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.Final
Environment: spring jpa hibernate project above mysql 5.1
Reporter: orasio spieler
Attachments: hib4-check.zip
Found the problem i also got org.hibernate.HibernateException: Wrong column type ... Found: bit, expected: boolean
on BooleanType in hibernate 4 they changed the Ctor to
public BooleanType() {
this( org.hibernate.type.descriptor.sql.BooleanTypeDescriptor.INSTANCE, BooleanTypeDescriptor.INSTANCE );
}
instead of old versions
public BooleanType() {
this( BitTypeDescriptor.INSTANCE, BooleanTypeDescriptor.INSTANCE );
}
spieler.orasio(a)gmail.com
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[Hibernate-JIRA] Created: (HBX-1159) hbm2ddl outputfiles should be comparables
by Maillefer Jean-David (JIRA)
hbm2ddl outputfiles should be comparables
-----------------------------------------
Key: HBX-1159
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1159
Project: Hibernate Tools
Issue Type: Improvement
Affects Versions: 3.2.0.GA
Reporter: Maillefer Jean-David
Priority: Minor
It would be very helpful if hbm2ddl could generate comparable output files. By comparable, I mean that using a diff tool, the order of the generated SQL elements should be the same. It's already the case for columns. But it's missing for foreign-keys: each time hbm2ddl is run, their respective order is changed, thus making the use of diff tools nearly useless.
Sample code (for postgresql):
We can see that the order of primary-key fields membre_id and principal_id has changed, but the structure is the same !
Run 1:
create table AdhesionId (
id serial not null,
modification timestamp not null,
version int4,
membre_id int4 not null,
principal_id int4 not null,
primary key (id)
);
Run 2 (after a modification to a field in another class):
create table AdhesionId (
id serial not null,
modification timestamp not null,
version int4,
principal_id int4 not null,
membre_id int4 not null,
primary key (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
11 years, 9 months