[Hibernate-JIRA] Created: (HHH-2289) CLONE -Support new MySQL 5.0.12 join syntax
by Peter Lundberg (JIRA)
CLONE -Support new MySQL 5.0.12 join syntax
-------------------------------------------
Key: HHH-2289
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2289
Project: Hibernate3
Type: New Feature
Components: query-sql
Versions: 3.1.2
Reporter: Peter Lundberg
http://dev.mysql.com/doc/refman/5.0/en/join.html
"Beginning with MySQL 5.0.12, natural joins and joins with USING, including outer join variants, are processed according to the SQL:2003 standard. These changes make MySQL more compliant with standard SQL. However, they can result in different output columns for some joins. Also, some queries that appeared to work correctly in older versions must be rewritten to comply with the standard. The following list provides more detail about several effects of the 5.0.12 change in join processing. The term "previously" means "prior to MySQL 5.0.12."
Using 5.0.18 and hibernate 3.1.2, hibernate is not producing the correct join syntax for the latest versions of mysql.
For example:
FROM tableA AS A, tableB AS B INNER JOIN tableC AS C ON A.field1 =
C.field2
The above fails, because the B JOIN C is evaluated before the A alias has
been created.
The solution is to use parentheses to force an order of evaluation:
FROM (tableA AS A, tableB AS B) INNER JOIN tableC AS C ON A.field1 =
C.field2
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-2675) Session.contains() always return false
by Mohammad Shoaib Ashrafi (JIRA)
Session.contains() always return false
--------------------------------------
Key: HHH-2675
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2675
Project: Hibernate3
Issue Type: Bug
Components: build
Affects Versions: 3.1.3
Environment: JDK1.5, Tomcat6.0 Hibernate 3, Windows XP
Reporter: Mohammad Shoaib Ashrafi
i have two class (User and Role) with hibernate one-to-one mapping
in runtime i load the user object after this i create the new user object with same primary key as loaded object
and when i call session.update(newUser) then it throws NonUniqueObjectException so i added some statement before update
if( session.contains(userObject) ){
session.evict(userObject)
}
session.update(userObject)
but the problem is here that session.contains(userObject) always return false
kindly resolved this issue and give the chance of thanks
Regards
Mohammad Shoaib Ashraif
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-2164) Minor bug in section "20.1.1. Customizing the schema"
by Andres Gonzalez (JIRA)
Minor bug in section "20.1.1. Customizing the schema"
-----------------------------------------------------
Key: HHH-2164
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2164
Project: Hibernate3
Type: Bug
Components: documentation
Versions: 3.2.0.ga
Reporter: Andres Gonzalez
Where it says:
*******************************************************************************************************************************
A unique-key attribute may be used to group columns in a single unique key constraint. Currently, the specified value of the unique-key attribute is not used to name the constraint in the generated DDL, only to group the columns in the mapping file.
<many-to-one name="org" column="orgId" unique-key="OrgEmployeeId"/>
<property name="employeeId" unique-key="OrgEmployee"/>
*******************************************************************************************************************************
i think the unique-key attributes should jave both the same value ("OrgEmployee", for example)
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-2583) inconsistency in case sensitivity of dialect registered keywords
by Pete Cassin (JIRA)
inconsistency in case sensitivity of dialect registered keywords
----------------------------------------------------------------
Key: HHH-2583
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2583
Project: Hibernate3
Issue Type: Bug
Components: documentation, query-hql
Affects Versions: 3.2.3
Reporter: Pete Cassin
Priority: Minor
Right now, the Dialect.registerKeyword() method seems to add a given Keyword to the set as is, without taking the lower case. This would be fine if the intent was to allow case sensitive keywords, however it becomes problematic when these dialect specified keywords are used by the method Template.isFunctionOrKeyword() - the tokens passed to this method always have toLowerCase() called on them prior to being passed in.
Thus, if I create a keyword
"someKeyword"
It will never be recognized as such because even if I included it in my hql with identical case, that method will always be checking the dialect's keyword set for "somekeyword".
thus, HQL passed into Template.renderWhereStringTemplate will end up incorrectly qualifying the keyword with a table name.
This isn't a serious bug by any means, but it may be good to at least note in documentation that user-specified keywords have to be all lowercase in order to function properly.
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-2542) NullPointerException in TypeFactory.replaceAssociations for ComponentType
by Reto Urfer (JIRA)
NullPointerException in TypeFactory.replaceAssociations for ComponentType
-------------------------------------------------------------------------
Key: HHH-2542
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2542
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.3
Reporter: Reto Urfer
The following code block will throw a NullPointerException when targetComponentValues should be determines and target[i] contains a NULL value.
else if ( types[i].isComponentType() ) {
// need to extract the component values and check for subtype replacements...
AbstractComponentType componentType = ( AbstractComponentType ) types[i];
Type[] subtypes = componentType.getSubtypes();
Object[] origComponentValues = original[i] == null ? new Object[subtypes.length] : componentType.getPropertyValues( original[i], session );
Object[] targetComponentValues = componentType.getPropertyValues( target[i], session );
replaceAssociations( origComponentValues, targetComponentValues, subtypes, session, null, copyCache, foreignKeyDirection );
This problem can be fixed the same way as it is prevented when origComponentValues are determined (see following line)
Object[] targetComponentValues = target[i] == null ? new Object[subtypes.length] : componentType.getPropertyValues( target[i], session );
copied[i] = target[i];
}
The problem did not exist in Version 3.2.2
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HHH-2369) Documentation doesn't state what hibernate returns for empty/null collections
by James Roper (JIRA)
Documentation doesn't state what hibernate returns for empty/null collections
-----------------------------------------------------------------------------
Key: HHH-2369
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2369
Project: Hibernate3
Type: Improvement
Components: documentation
Versions: 3.2.1
Reporter: James Roper
Priority: Trivial
Reading the hibernate documentation, section 6.1:
"Hibernate does not distinguish between a null collection reference and an empty collection"
This is all very well, but what does hibernate return when loading a null/empty collection?
According to the EJB3 specification, section 2.1.7:
"If there are no associated entities for a multi-valued relationship of an entity fetched from the database, the persistence provider is responsible for returning an empty collection as the value of the relationship."
If this is the behavior that hibernate implements, then this should be explicitly stated in the hibernate documentation, so that developers know whether they need to do null checks or not after loading an object from the database.
--
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
17 years, 4 months