[Hibernate-JIRA] Créée: (HHH-2060) To be able to use <generator> with <composite-id>
by Xavier Brénuchon (JIRA)
To be able to use <generator> with <composite-id>
-------------------------------------------------
Key: HHH-2060
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2060
Project: Hibernate3
Type: Improvement
Versions: 3.2.0.cr4
Environment: Hibernate 3.x
Reporter: Xavier Brénuchon
Hello,
This is the continuation of HB-389
We develop an application which has very strong need for performance with several tens of million recordings. Partitioning is a need.
So for that, I use <composite-id>. But my primary key is not a natural key, but a real technical key :
- column of partitioning for optimization of the data base
- column of technical id
So I need to have a generator, for exemple :
<composite-id name="id" class="IdPartition">
<key-property name="org" type="string" column="ORG"/>
<key-property name="id" type="long" column="ID"/>
<generator class="fr.test.xavier.IdPartitionGenerator">
<param name="table">TAB_SEQ</param>
<param name="column">LAST</param>
</generator>
</composite-id>
The good news is that Hibernate can use that (HB-389).
In fact, it is enough to modify the DTD to authorize <generator> in <composite-id> and it is all. The current code of Hibernate manages it very well.
Is it possible that Hibernate is enriched by this functionality?
--
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, 9 months
[Hibernate-JIRA] Created: (HHH-3531) Constraint violation Error
by suman (JIRA)
Constraint violation Error
--------------------------
Key: HHH-3531
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3531
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Spring/Hibernate/Mysql/
Reporter: suman
Hello All,
I am Using Spring with Hibernate in my web application.I got Syncronize Exception in some Cases.Atually i am updating to table(sno[PK,Auto increment],acno,pan)
In my HBM file i am mentioning sno as increment of generator class.Keen obeservation i am not getting this sort of problem always.In some Time i got this sort of proble,
Log as follows:
INFO | jvm 2 | 2008/10/15 16:06:25 | 16:06:25,353 WARN JDBCExceptionReporter:71 - SQL Error: 1062, SQLState: 23000
INFO | jvm 2 | 2008/10/15 16:06:25 | 16:06:25,354 ERROR JDBCExceptionReporter:72 - Duplicate key or integrity constraint violation, message from server: "Duplicate entry '984041' for key 1"
INFO | jvm 2 | 2008/10/15 16:06:25 | 16:06:25,355 ERROR AbstractFlushingEventListener:277 - Could not synchronize database state with session
INFO | jvm 2 | 2008/10/15 16:06:25 | org.hibernate.exception.ConstraintViolationException: could not insert: [com.xxx.model.map]
--
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, 9 months
[Hibernate-JIRA] Created: (BVAL-36) Validation of method parameters and returned values
by Emmanuel Bernard (JIRA)
Validation of method parameters and returned values
---------------------------------------------------
Key: BVAL-36
URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-36
Project: Bean Validation
Issue Type: New Feature
Components: spec-general
Reporter: Emmanuel Bernard
Assignee: Emmanuel Bernard
The goal is to expose the necessary APIs to validate method parameters and returned type. This API can typically be used by an interceptor framework.
Validator {
List<IC> validateParameters(Method, Object[] parameterValues);
List<IC> validateParameter(Method, Object parameterValue, int parameterIndex);
List<IC> validateReturnedValue(Method, Object returnedValue);
List<IC> validateParameters(Constructor, Object[] parameterValues);
List<IC> validateParameter(Constructor, Object parameterValue, int parameterIndex);
}
Metadata
Validator {
BeanDescriptor getConstraintsForBean()
PropertyDescriptor getConstraintsForProperty(String propertyName);
MethodDescriptor getConstraintsForMethod(Method);
MethodDescriptor getConstraintsForConstructor(Constructor);
String[] getValidatedProperties();
Method[] getValidatedMethods();
Constructor[] getValidatedConstructors();
}
ElementDescriptor {
ElementType getElementType();
Class getType();
List<ConstraintDescriptor> getConstraintDescriptors();
}
PropertyDescriptor extends ElementDescriptor {
boolean isCascaded();
String getPropertyPath();
}
ParameterDescriptor extends ElementDescriptor {
boolean isCascaded();
int getIndex();
}
BeanDescriptor extends ElementDescriptor {
}
MethodDescriptor extends ElementDescriptor {
List<ParameterDescriptor> getParameterDescriptors(); //index aligned
boolean isCascaded();
}
ConstructorDescriptor extends ElementDescriptor {
List<ParameterDescriptor> getParameterDescriptors(); //index aligned
}
How to read parameter annotations
Class<?> parameterTypes = method.getParameterTypes()
Annotation[][] parameterAnnotations = method.getParameterAnnotations()
--
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, 9 months