[Hibernate-JIRA] Commented: (HV-21) Base class validations are not over-ridden
by Hardy Ferentschik (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-21?page=com.... ]
Hardy Ferentschik commented on HV-21:
-------------------------------------
As Emmanuel is saying, in Validator 4.x this is expected behavior according to the BV specification. If we want to discuss a new HV specific feature for 4.x we should do so in a new jira.
> Base class validations are not over-ridden
> ------------------------------------------
>
> Key: HV-21
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-21
> Project: Hibernate Validator
> Issue Type: Improvement
> Components: legacy
> Environment: hibernate 3.2 cr2
> Reporter: Aseel Abbas
> Fix For: 3.2.0
>
>
> When the same validation annotation is applied to an over-riding method in a subclass the expected behaviour is that the validation annotation in the base class is over-ridden. Currently, both validations are executed. This severely limits the usability of the package for domain models where inheritance is used.
> The problem also occurs with over-riding interfaces.
> For example:
> class A {
> @Length (min = 0, max = 32)
> Integer getFoo() {
> return foo;
> }
> }
> class B extends A
> {
> @Length (min = 15, max = 20)
> Integer getFoo() {
> return super.getFoo();
> }
> }
> In this case validating an instance of class B which has a foo value of 100 will result in two error messages: "foo must be between 15 and 20" and "foo must be between 0 and 32".
--
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
13 years, 12 months
[Hibernate-JIRA] Commented: (HHH-635) Make DetachedCriteria.getExecutableCriteria(session) return a new Criteria each time
by Sergey Vidyuk (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-635?page=co... ]
Sergey Vidyuk commented on HHH-635:
-----------------------------------
It's really useful to have ability to create executable criteria which is deep clone of DetachedCriteria instance. Detached criteria looks like really great solution for lazy loaded paginated lists with complex filtering conditions but in fact it's almost completely unusable for this task. Are there any plans to fix this issue?
It would be great to have something like DetachedCritaria.createExecutableCriteria(Session) which returns new criteria object which you can modify without affecting parent DetachedCriteria.
> Make DetachedCriteria.getExecutableCriteria(session) return a new Criteria each time
> ------------------------------------------------------------------------------------
>
> Key: HHH-635
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-635
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.0.5
> Environment: Appserver: Hibernate 3.0.5/Jboss-4.0.2/Windows XP Professional, DB server: Linux/Oracle 9.2.0.1
> Reporter: Callum Haig
> Priority: Minor
>
> It would be useful if a DetachedCriteria could be used to generate independent Criteria instances. For example, one could be used to get the row count after applying the appropriate projection. A second could then be used to return the desired result set.
> Many thanks for the hard work of the Hibernate team.
--
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
13 years, 12 months
[Hibernate-JIRA] Commented: (HV-21) Base class validations are not over-ridden
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-21?page=com.... ]
Emmanuel Bernard commented on HV-21:
------------------------------------
This is the expected behavior in Bean Validation AFAIR because constraints are seen as contracts and not overridable implementation details.
We won't change this behavior at least until we have a satisfying customizable solution. This is likely involve the porgrammatic API maybe with meta rules.
> Base class validations are not over-ridden
> ------------------------------------------
>
> Key: HV-21
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-21
> Project: Hibernate Validator
> Issue Type: Improvement
> Components: legacy
> Environment: hibernate 3.2 cr2
> Reporter: Aseel Abbas
> Fix For: 3.2.0
>
>
> When the same validation annotation is applied to an over-riding method in a subclass the expected behaviour is that the validation annotation in the base class is over-ridden. Currently, both validations are executed. This severely limits the usability of the package for domain models where inheritance is used.
> The problem also occurs with over-riding interfaces.
> For example:
> class A {
> @Length (min = 0, max = 32)
> Integer getFoo() {
> return foo;
> }
> }
> class B extends A
> {
> @Length (min = 15, max = 20)
> Integer getFoo() {
> return super.getFoo();
> }
> }
> In this case validating an instance of class B which has a foo value of 100 will result in two error messages: "foo must be between 15 and 20" and "foo must be between 0 and 32".
--
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
13 years, 12 months
[Hibernate-JIRA] Commented: (HV-21) Base class validations are not over-ridden
by Thilko Richter (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HV-21?page=com.... ]
Thilko Richter commented on HV-21:
----------------------------------
We still have this problem with 4.0.0.GA. Should this problem fixed in the 4.x.x codebase?
> Base class validations are not over-ridden
> ------------------------------------------
>
> Key: HV-21
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-21
> Project: Hibernate Validator
> Issue Type: Improvement
> Components: legacy
> Environment: hibernate 3.2 cr2
> Reporter: Aseel Abbas
> Fix For: 3.2.0
>
>
> When the same validation annotation is applied to an over-riding method in a subclass the expected behaviour is that the validation annotation in the base class is over-ridden. Currently, both validations are executed. This severely limits the usability of the package for domain models where inheritance is used.
> The problem also occurs with over-riding interfaces.
> For example:
> class A {
> @Length (min = 0, max = 32)
> Integer getFoo() {
> return foo;
> }
> }
> class B extends A
> {
> @Length (min = 15, max = 20)
> Integer getFoo() {
> return super.getFoo();
> }
> }
> In this case validating an instance of class B which has a foo value of 100 will result in two error messages: "foo must be between 15 and 20" and "foo must be between 0 and 32".
--
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
13 years, 12 months
[Hibernate-JIRA] Created: (HHH-5287) hibernate cannot handle Entities with Inheritance and a Discriminator that is part of composite pk
by AndyW (JIRA)
hibernate cannot handle Entities with Inheritance and a Discriminator that is part of composite pk
--------------------------------------------------------------------------------------------------
Key: HHH-5287
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5287
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: Linux, JDK1.6
Reporter: AndyW
Attachments: jpatest_hibernate33.zip
hi,
i am using
Hibernate Annotations 3.4.0.GA
Hibernate EntityManager 3.4.0.GA
Hibernate 3.3.2.GA
with JPA 1.0
hibernate fails to create the entities using a SINGLE_TABLE Inheritance when the Discriminator is
part of the composite primary key. I have attached a testcase.
hibernate is expected to only create a table LADEEINHEIT_EINAUS. however it also creates
a table for each of the two entities that extend the base class and defines a DiscriminatorValue
@Entity
@DiscriminatorValue("EINGANG")
public class LadeeinheitEingaenge extends LadeeinheitEinausgaenge
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "LAEA_TYP", discriminatorType = DiscriminatorType.STRING)
@Table(name = "LADEEINHEIT_EINAUS")
@MappedSuperclass
public abstract class LadeeinheitEinausgaenge
i have executed the same code using EclipseLink. EclipseLink only created one table 'LADEEINHEIT_EINAUS'
which is what i expected.
log output from the testcase:
06:59:30,017 [main] DEBUG SchemaUpdate - create table LADEEINHEIT_EINAUS (LAEA_TYP varchar(31) not null, LAEI_AUFT_AUFT_NR bigint not null, LAEI_AUFT_MAND_MAND_NR bigint not null, LAEI_LAEI_LFD_NR bigint not null, LAEA_LOCATION_CODE varchar(6), LAEA_RADIO_CALL_SIGN varchar(4), primary key (LAEA_TYP, LAEI_AUFT_AUFT_NR, LAEI_AUFT_MAND_MAND_NR, LAEI_LAEI_LFD_NR))
06:59:30,021 [main] DEBUG SchemaUpdate - create table LadeeinheitAusgaenge (LAEA_TYP varchar(10) not null, LAEI_AUFT_AUFT_NR bigint not null, LAEI_AUFT_MAND_MAND_NR bigint not null, LAEI_LAEI_LFD_NR bigint not null, LAEA_LOCATION_CODE varchar(6), LAEA_RADIO_CALL_SIGN varchar(4), primary key (LAEA_TYP, LAEI_AUFT_AUFT_NR, LAEI_AUFT_MAND_MAND_NR, LAEI_LAEI_LFD_NR))
06:59:30,022 [main] DEBUG SchemaUpdate - create table LadeeinheitEingaenge (LAEA_TYP varchar(10) not null, LAEI_AUFT_AUFT_NR bigint not null, LAEI_AUFT_MAND_MAND_NR bigint not null, LAEI_LAEI_LFD_NR bigint not null, LAEA_LOCATION_CODE varchar(6), LAEA_RADIO_CALL_SIGN varchar(4), primary key (LAEA_TYP, LAEI_AUFT_AUFT_NR, LAEI_AUFT_MAND_MAND_NR, LAEI_LAEI_LFD_NR))
cheers,
andy
--
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
14 years
[Hibernate-JIRA] Created: (HHH-5316) My application is running and if any one update the database, it leeds to error Database Operation error sometimes while using the application,
by sagar Bijwe (JIRA)
My application is running and if any one update the database, it leeds to error Database Operation error sometimes while using the application,
-----------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-5316
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5316
Project: Hibernate Core
Issue Type: Deprecation
Affects Versions: 3.2.1
Environment: Production Envirnement
Reporter: sagar Bijwe
My application running successfully and in between if anyone update database so sometimes it gives beloaw "DATABASE OPERATION ERROR", not sure what is happening...
However when restart the Tomcat, it works fine again performing operation in the database...it gives error
Please find below stack trace for the same.....
Caused by class org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2231)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at com.icrossing.sharpview.dao.hibernate.SharpviewUserHibernateDao.getAll(SharpviewUserHibernateDao.java:46)
at com.icrossing.sharpview.business.SharpviewUserService.getAllUsers(SharpviewUserService.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
--
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
14 years
[Hibernate-JIRA] Created: (HHH-3992) SQLServer "contains" boolean predicate not handled in HQL
by Scott Van Wart (JIRA)
SQLServer "contains" boolean predicate not handled in HQL
---------------------------------------------------------
Key: HHH-3992
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3992
Project: Hibernate Core
Issue Type: Improvement
Components: query-hql
Affects Versions: 3.3.2, 3.3.1
Environment: Hibernate core 3.3.1, JDK 1.6, SQLServer 2003
Reporter: Scott Van Wart
The following HQL:
select pp from Product pp where CONTAINS( pp.keywords, :keywords )
Will throw this exception:
org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: ( near line 1, column 33 [select pp from Product pp where CONTAINS( pp.keywords, :keywords )]
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:258)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)
I tried changing it to this:
select pp from Product pp where CONTAINS( pp.keywords, :keywords ) = TRUE
But then SQL Server doesn't like it (it produces SQL like "CONTAINS(pkgproduct0_.keywords, ?)=1":
org.hibernate.exception.SQLGrammarException: could not execute query using scroll
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '='.
--
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
14 years