[Hibernate-JIRA] Created: (ANN-606) Annotation Validation: @Immutable annotation does not throw error or warning on usage on subclass
by Paul Singleton Kossler (JIRA)
Annotation Validation: @Immutable annotation does not throw error or warning on usage on subclass
--------------------------------------------------------------------------------------------------
Key: ANN-606
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-606
Project: Hibernate Annotations
Issue Type: Bug
Components: binder, documentation
Affects Versions: 3.3.0.ga
Environment: Hibernate3, Annotations.3.3.0
Reporter: Paul Singleton Kossler
The @Immutable annotation does not throw a configuration error when used on a subclass. The action required depends upon the decision in a bug/patch request for adding mutable=false to subclasses. In the current rule set the Mapping Schema for pre annotations is leveraged to define the legallity of declaring a mapped object Immutable. Base/Root classes allowed, child classes of Mutable=true not allowed, in either case the mutability of an object is directly dependent upon the mutability of the root mapped object in the object hierarchy.
The following documentation sources do not mention the issue in relation to the @Immutable annotation:
* online/down-loadable Hibernate-Annotations
* Java Persistence with Hibernate (ISBN: 1-932394-88-5)
If the rules outlined above are accurate or not: A validation error or warning should be thrown from Configuration during the loading of an incorrectly mapped class. The current method is to check the Annotations at bind time, and only at the "correct" location. This meta-rule validation should occur during the binding of a mapping to the Configuration, quickly indicating an error. Using the "older" xml based mapping this occurs when the schema (xsd) validates the mapping file (xml).
--
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
16 years, 9 months
[Hibernate-JIRA] Created: (ANN-551) @SQLInsert. Columns in sql comes in different order depending on the application server used
by Søren Pedersen (JIRA)
@SQLInsert. Columns in sql comes in different order depending on the application server used
--------------------------------------------------------------------------------------------
Key: ANN-551
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-551
Project: Hibernate Annotations
Type: Bug
Components: binder
Versions: 3.2.1
Environment: Hibernate-core 3.2.2, hibernate-annotations 3.2.1. WebLogic 9.2 and JBoss 4.0.5. Oracle 10.
Reporter: Søren Pedersen
Problem:
The columns in the sql you specify in SQLInsert annotation has be ordered in the same way hibernate sorts its properties when constructing the insert sql.
Example:
When WebLogic 9.2 is used the sql should look like this:
"insert into acount (name, address, country) values (?,?,?)"
But when JBoss 4.0.5 is used the sql should look like this:
"insert into acount (address, country, name) values (?,?,?)"
The above are only examples.
Consequence:
I have to have different SQLInsert's for every JEE apllication server we support, because the properties comes in different order depending on the application server used.
Suggested solution:
In the method org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(List<PropertyData> elements, PropertyHolder propertyHolder, boolean isPropertyAnnotated,String propertyAccessor, final XClass annotatedClass, ExtendedMappings mappings)
This property list shown below should be sorted to make sure that the properties also come in the same order:
List<XProperty> properties = annotatedClass.getDeclaredProperties( accessType );
--
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
16 years, 9 months