[Hibernate-JIRA] Moved: (HV-7) Two level @Valid annotation doesn't work
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-7?page=all ]
Emmanuel Bernard moved ANN-511 to HV-7:
---------------------------------------
Version: (was: 3.2.1)
Bundle 3.2.1
Fix Version: (was: 3.2.2)
FIRST
Component: (was: validator)
engine
Key: HV-7 (was: ANN-511)
Project: Hibernate Validator (was: Hibernate Annotations)
> Two level @Valid annotation doesn't work
> -----------------------------------------
>
> Key: HV-7
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-7
> Project: Hibernate Validator
> Type: Bug
> Components: engine
> Versions: Bundle 3.2.1
> Environment: hibernate-annotations 3.2.1.ga
> Reporter: Rakesh Kalra
> Assignee: Emmanuel Bernard
> Fix For: FIRST
>
> Original Estimate: 1 hour
> Remaining: 1 hour
>
> I have object depth of 3: Form, Member, Address. I get the following exception when initializing ClassValidator:
> java.lang.NullPointerException
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:142)
> at org.hibernate.validator.ClassValidator.createChildValidator(ClassValidator.java:252)
> at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:149)
> at org.hibernate.validator.ClassValidator.createChildValidator(ClassValidator.java:252)
> at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:134)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97)
> ...
> This works fine with 3.2.0.ga.
> I think the problem is in the following constructor, where instance level "reflectionManager" is not being initialized.
> protected ClassValidator(
> XClass beanXClass, ResourceBundle resourceBundle, MessageInterpolator userInterpolator,
> Map<XClass, ClassValidator> childClassValidators, ReflectionManager reflectionManager
> ) {
> this.beanClass = reflectionManager.toClass( beanXClass );
> this.messageBundle = resourceBundle == null ?
> getDefaultResourceBundle() :
> resourceBundle;
> this.defaultMessageBundle = ResourceBundle.getBundle( DEFAULT_VALIDATOR_MESSAGE );
> this.userInterpolator = userInterpolator;
> this.childClassValidators = childClassValidators;
> initValidator( beanXClass, childClassValidators );
> }
> The other constructor initializes reflectionManager.
--
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
18 years, 7 months
[Hibernate-JIRA] Moved: (HV-5) Multiple validators of the same type per element (John Gilbert)
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-5?page=all ]
Emmanuel Bernard moved ANN-513 to HV-5:
---------------------------------------
Version: (was: 3.2.1)
Bundle 3.2.1
Fix Version: (was: 3.2.2)
FIRST
Component: (was: validator)
validators
Key: HV-5 (was: ANN-513)
Project: Hibernate Validator (was: Hibernate Annotations)
> Multiple validators of the same type per element (John Gilbert)
> ---------------------------------------------------------------
>
> Key: HV-5
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-5
> Project: Hibernate Validator
> Type: Improvement
> Components: validators
> Versions: Bundle 3.2.1
> Reporter: Edwin van der Elst
> Assignee: Emmanuel Bernard
> Priority: Minor
> Fix For: FIRST
> Attachments: ClassValidator.java, validators_patch.txt
>
>
> I have a suggestion for the following problem:
> I created an Validator to check if a 'date'> 'another date'
> The annotation looks like this:
> @After(property="endDate", after="beginDate", message="End should be after begin")
> Since it involves 2 properties, it is a class-level validation.
> Now....
> I want multiple 'after' validations on a single bean.
> But that is not possible (you can only place an annotation once on a class).
> My proposal is to add an annotation 'Validations':
> @Validations( {@After(...), @After(..)} )
> I could do the multiple validations in a single validatorclass, but I want all the messages added to the invalidValues array, not a single message.
> This change would also require changes in the ClassValidator class.
> What do you think of this proposal? Should I add it to Jira (I can propably implement it if there are no objections to the required changes)
--
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
18 years, 7 months
[Hibernate-JIRA] Created: (HHH-2376) Query with fully qualified entity class fails
by Neukomm (JIRA)
Query with fully qualified entity class fails
---------------------------------------------
Key: HHH-2376
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2376
Project: Hibernate3
Type: Bug
Components: query-hql
Versions: 3.2.1
Environment: Hibernate 3.2.1ga, HSQLDB 1.8.0.4
Reporter: Neukomm
Attachments: DiscriminatorTest2.java
We've recently ran into a problem while migrating from Hibernate 3.1.1 to Hibernate 3.2.1ga:
While queries against the class attribute still work, if the class is non-qualified, the query fails if the
name is fully qualified.
e.g.
"from Person p where p.class = Person"
works fine while
"from Person p where p.class = org.hibernate.test.discriminator.Person"
fails.
I've attached a test case to illustrated the problem. It should work when it's put into the
'discriminator' package of the hibernate junit test cases.
Both testcases work fine for hibernate versions up to and including 3.2.0cr2.
In later versions, specifically in 3.2.1ga, the test case that uses the fully qualified class name
('testQueryWithPackage') fails.
--
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
18 years, 7 months