Hibernate Validator 6.0.3.Final released
by Guillaume Smet
Hi,
We just released Hibernate Validator 6.0.3.Final. It fixes a few
issues reported by our users, adds a new SPI for providing a custom
ScriptEvaluatorFactory, introduces a new @CodePointLength constraint
and is faster than ever.
It is a recommended upgrade for everyone already using 6.0.x.
For more information, read the announcement here:
http://in.relation.to/2017/10/19/hibernate-validator-603-final-out/ .
We also released maintenance releases for the 5.3 and 5.4 branches but
we …
[View More]recommend that all users should upgrade to 6.0 now.
Have a nice day!
--
Guillaume
[View Less]
7 years, 5 months
<join ... fetch="select"/>
by Steve Ebersole
Hibernate mappings define a feature to allow a secondary table (`<join/>`
in hbm terms) to be defined as not joined via : `<join ...
fetch="select"/>`. This actually creates a subsequent select to load the
data from the secondary table.
I am trying to figure out how to best incorporate this into the paradigm
for JDBC statement execution in 6.0. My first thought was "do we need to
keep this?". Does anyone know of a real usage of this feature? In theory
it could be useful to some …
[View More]degree along with bytecode enhanced interception
for lazy-loading individual attributes. But even then, I'm not sure how
practically useful that is.
[View Less]
7 years, 5 months
Statements leaks when using JPA StoredProcedureQuery API
by Robert Marcano
Migrating code from the Hibernate API to JPA, I found a stored procedure
being called on a loop that was generating DB2 errors [1] on tests. This
error is caused in this case for having a lot of not closed statements.
The problem didn't happen using ProcedureCall Hibernate API because the
method getOutputs() and release() from the Outputs instance are available.
StoredProcedureQuery JPA API doesn't have any way to "close" the query
and by that, the statement. Reusing the same instance of
…
[View More]StoredProcedureQuery trying to only leak an unclosed statement but that
doesn't help either, ProcedureCallImpl is creating a new statement for
every call [2].
The only option is to unwrap the StoredProcedureQuery to an
StoredProcedureQuery and release the Outputs instance.
I don't think there is a way to avoid this without enhancing the JPA
API. Client code can call an store procedure and in some cases not
caring about all the results, so there is no way for a JPA
implementation to know when to close the statement.
Making StoredProcedureQuery an AutoCloseable may help, but it will
contrast with other Query types that don't need to be closed.
Note: It is not frequent to call many store procedures on a loop, I
would have preferred to just create a new procedure with the loop, but
for this application the conditions about when to call the procedure for
each iteration are outside the database.
[1] http://www-01.ibm.com/support/docview.wss?uid=swg21504334
[2]
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src...
[View Less]
7 years, 5 months
Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API
by Robert Marcano
On 10/11/2017 03:15 PM, Vlad Mihalcea wrote:
> You can open a GitHub issue for JPA. Meanwhile, you can work around it
> as you suggested.
Opened an issue on JPA spec https://github.com/javaee/jpa-spec/issues/162
>
> On 11 Oct 2017 9:08 pm, "Robert Marcano" <robert(a)marcanoonline.com
> <mailto:robert@marcanoonline.com>> wrote:
>
> Migrating code from the Hibernate API to JPA, I found a stored procedure
> being called on a loop that was …
[View More]generating DB2 errors [1] on tests. This
> error is caused in this case for having a lot of not closed statements.
>
> The problem didn't happen using ProcedureCall Hibernate API because the
> method getOutputs() and release() from the Outputs instance are
> available.
>
> StoredProcedureQuery JPA API doesn't have any way to "close" the query
> and by that, the statement. Reusing the same instance of
> StoredProcedureQuery trying to only leak an unclosed statement but that
> doesn't help either, ProcedureCallImpl is creating a new statement for
> every call [2].
>
> The only option is to unwrap the StoredProcedureQuery to an
> StoredProcedureQuery and release the Outputs instance.
>
> I don't think there is a way to avoid this without enhancing the JPA
> API. Client code can call an store procedure and in some cases not
> caring about all the results, so there is no way for a JPA
> implementation to know when to close the statement.
>
> Making StoredProcedureQuery an AutoCloseable may help, but it will
> contrast with other Query types that don't need to be closed.
>
> Note: It is not frequent to call many store procedures on a loop, I
> would have preferred to just create a new procedure with the loop, but
> for this application the conditions about when to call the procedure for
> each iteration are outside the database.
>
> [1] http://www-01.ibm.com/support/docview.wss?uid=swg21504334
> <http://www-01.ibm.com/support/docview.wss?uid=swg21504334>
> [2]
> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src...
> <https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src...>
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org <mailto:hibernate-dev@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> <https://lists.jboss.org/mailman/listinfo/hibernate-dev>
>
[View Less]
7 years, 5 months
@db.dialect@ - yet again
by Steve Ebersole
I just upgraded to IntelliJ 2017.3 EAP and am back to this frustrating
"Dialect class not found: @db.dialect@" problem. I run the
`processTestResources` (or `compile`, does not matter) and then when I try
to run a test in the IDE I get this error.
What is the magic incantation I am missing?
7 years, 5 months
Property "ogm.datastore.create_database": fit for purpose?
by Sanne Grinovero
This property is defined in hibernate-ogm-core and while it's quite
self-explanatory with other NoSQL stores, it doesn't translate nicely
to the Infinispan scenario.
I'd be tempted to introduce ad-hoc properties for each Dialect so that
their effect is clear, allowing to pick more fitting names.
We also like to keep configuration properties to the minimun. In fact
I'd like to simply use Environment.HBM2DDL_AUTO to create / define
Caches ?
Conceptually in Infinispan they are closer to "tables"…
[View More] than
"databases", except they are all schema less and we deploy a schema
using a different operation..
Let the fight begin!
Thanks,
Sanne
[View Less]
7 years, 5 months
Re: [hibernate-dev] New layout for in.relation.to
by Guillaume Smet
On Sun, Oct 1, 2017 at 6:18 PM, Marko Bekhta <marko.prykladna(a)gmail.com>
wrote:
> otherwise they are displayed differently for each post. WDYT?
>
>
Good idea. As of now, they should be on a separate line on mobile.
7 years, 5 months