Re: [hibernate-dev] Fwd: Link to test case templates

2015-11-02 Thread Steve Ebersole
The other option is to plug in a org.hibernate.resource.jdbc.spi.StatementInspector. You can do this on the SessionFactory or Session level On Mon, Nov 2, 2015 at 2:29 AM Radim Vansa wrote: > You can mock the JDBC driver and test the emitted SQL from there; I am > using mockrunner-jdbc [1] to d

Re: [hibernate-dev] SQM : Criteria translation design

2015-11-02 Thread Steve Ebersole
I mean that the JPA contracts in general do not expose enough information to interpret them. Take the one example I mentioned in my email... Predicate. The JPA contracts do not give enough information to know if a Predicate is a BETWEEN, or a LIKE or a IS_NULL or ... they are all just Predicate.

Re: [hibernate-dev] Hibernate5 migration

2015-11-02 Thread Scott Marlow
On 11/02/2015 11:02 AM, Steve Ebersole wrote: > This is mentioned... > https://github.com/hibernate/hibernate-orm/blob/master/migration-guide.adoc#transactions > > Its not just org.hibernate.transaction.CMTTransactionFactory that was > removed; all of the TransactionFactory classes were removed. A

Re: [hibernate-dev] Hibernate5 migration

2015-11-02 Thread Steve Ebersole
This is mentioned... https://github.com/hibernate/hibernate-orm/blob/master/migration-guide.adoc#transactions Its not just org.hibernate.transaction.CMTTransactionFactory that was removed; all of the TransactionFactory classes were removed. Actually I think we should add them as resolvable names:

Re: [hibernate-dev] Hibernate5 migration

2015-11-02 Thread Scott Marlow
Should the ORM 5 migration documentation [3] mention that "hibernate.transaction.factory_class" can no longer be set to "org.hibernate.transaction.CMTTransactionFactory"? I think that CMTTransactionFactory is deleted in 5.0. Scott [3] https://github.com/hibernate/hibernate-orm/blob/master/mi

Re: [hibernate-dev] HQL and spatial

2015-11-02 Thread Steve Ebersole
Karel, Any further thoughts? I looked over the link you gave in regards to literals, but did not fully understand. I'd prefer this follow some "escape syntax" form, beyond that maybe you could just enumerate the literal types you'd want to support and their formats. ALso, I have not seen any di

Re: [hibernate-dev] SQM : Criteria translation design

2015-11-02 Thread Gunnar Morling
Hi, What exactly DYM by "The criteria nodes would be expected to implement an SQM extension accepting a visitor"? My first thought would have been a combination of the two approaches: Let the criteria objects expose all the required data, make them traversable by means of a visitor and have an SQ

Re: [hibernate-dev] Fwd: Link to test case templates

2015-11-02 Thread Radim Vansa
You can mock the JDBC driver and test the emitted SQL from there; I am using mockrunner-jdbc [1] to do that. Since Hibernate needs to chat with DB a bit before doing the logic of that test, it's convenient to switch between real DB and the mocks at runtime. I've created a little tool [2] to do