Re: [hibernate-dev] 6.0 - procedure/function calls via NativeQuery

2017-07-27 Thread Vlad Mihalcea
I run a quick Google search for "Hibernate NnativeQuery stored procedure" and found these links: http://www.baeldung.com/stored-procedures-with-hibernate-tutorial https://www.mkyong.com/hibernate/how-to-call-store-procedure-in-hibernate/ I guess people used to do this. We could use some QueryHin

Re: [hibernate-dev] Are arrays of non-basic elements supported?

2017-07-27 Thread Vlad Mihalcea
I fixed it with the following commit: https://github.com/hibernate/hibernate-orm/commit/871722dc08ec131cd1f5238e1b48df8db2dcc402 Let me know if it's more clear now. Vlad On Wed, Jul 26, 2017 at 7:32 PM, Gail Badner wrote: > OK, I'll make sure Hibernate also treats an empty array element as >

Re: [hibernate-dev] 6.0 - procedure/function calls via NativeQuery

2017-07-27 Thread Arnold Gálovics
Hey, @Vlad: if they eventually have to adjust their code, why is it so hard to use the proper API for calling stored procedures? I'm supporting Steve's idea to remove this complexity and force the users to use the proper API. I think for 6.0 this change can be acceptable and should be mentioned i

Re: [hibernate-dev] 6.0 - procedure/function calls via NativeQuery

2017-07-27 Thread Vlad Mihalcea
If we make this change, we need to make sure the StoredProcedureQuery works properly for functions too: https://vladmihalcea.com/2016/04/27/how-to-call-sql-server-stored-procedures-and-functions-from-hibernate/ Currently, it only supports stored procedures and not database functions. However, use

Re: [hibernate-dev] 6.0 - procedure/function calls via NativeQuery

2017-07-27 Thread andrea boriero
+1 for removing it On 27 July 2017 at 10:54, Vlad Mihalcea wrote: > If we make this change, we need to make sure the StoredProcedureQuery works > properly for functions too: > > https://vladmihalcea.com/2016/04/27/how-to-call-sql-server- > stored-procedures-and-functions-from-hibernate/ > > Curr

[hibernate-dev] PESSIMISTIC_FORCE_INCREMENT lock mode

2017-07-27 Thread Arnold Gálovics
Hi all, I'm a bit confused with the mentioned lock mode. *The doc says the following:* *"The entity is locked pessimistically and its version is incremented automatically even if the entity has not changed."* I'm checking this with an H2 DB and the current behavior is the following: - the versio

Re: [hibernate-dev] 6.0 - procedure/function calls via NativeQuery

2017-07-27 Thread Steve Ebersole
Vlad, we have had this discussion like 5 times now ;) http://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg13885.html -> https://hibernate.atlassian.net/browse/HHH-10530 The ProcedureCall support for this is already mostly in place. Using your post example e.g., you'd do something like:

Re: [hibernate-dev] Are arrays of non-basic elements supported?

2017-07-27 Thread Steve Ebersole
I think that is still confusing. I'd suggest something like: When discussing arrays, it is important to understand the distinction between SQL array types and Java arrays that are mapped as part of the application's domain model. Not all databases implement the SQL-99 ARRAY type and, for this r

Re: [hibernate-dev] PESSIMISTIC_FORCE_INCREMENT lock mode

2017-07-27 Thread Steve Ebersole
Without looking at the complete passage in Vald's article, I will say that the single phrase you pulled out of that context is not accurate IMO On Thu, Jul 27, 2017, 12:01 PM Arnold Gálovics wrote: > Hi all, > > I'm a bit confused with the mentioned lock mode. > > *The doc says the following:* >