| I completely agree that we need the SessionFactory-level option. I also agree that we should allow it at a more granular level. The question really is "which level? per-query or per-param?". Per-param is the most natural in terms of fit, but it's also the least straightforward in terms of API. Also, we have to consider the JPA and native splits here. For native we can of course introduce our own API methods as we see fit. For JPA this has to be done via hints query.setHint( "hibernate.proc.param.nulls.foo", "pass" ) (assuming values like pass, ignore). We also have to consider named queries and how to allow specifying this parameter nullness handling in the named definition. And again that is a very different proposition between native and JPA. |