On Sun 27 May 2012 02:52:23 AM CDT, Łukasz Antoniak wrote: > The initial question here is how to distinguish dialects that support > statements like: > update ParentEntity_AUD set REVEND=? where (id, REV) IN (select id, > REV from HT_ChildEntity_AUD)
Ok. And this form comes about because of the multi-table HQL splitting to use temp tables right? As an alternative suggestion, why don't we just have envers directly perform an SQL UPDATE? Its really just the ParentEntity_AUD table you want to update right? And this is really just to lock the table right? > > I am not understanding the need for > > supportsRowValueConstructorSyntaxInSelectList. What exactly is the > > purpose of grouping the values together in a select list? And in fact > > you are not even using tuple (row value constructor) syntax in any of > > the selects. > I can see that people name this type of SQL queries ("where (a1, b1) > IN (select c1, d1 from another_table)") as row value constructor, for > example here: > http://connect.microsoft.com/SQLServer/feedback/details/299231/add-support-for-ansi-standard-row-value-constructors. > Maybe the name "supportsRowValueConstructorSyntaxInSubquery" would be > more accurate. Ok, then the issue is naming. See the issue is not the subquery. The subquery does not even have a row value constructor; "select c1, d1" is just a simple select list. The problem is that the dialect does not support the use of a subquery as the predicate of a logical expression where the other predicate is a tuple. Basically they are doing too simplistic of type checking on the 2 predicates. So maybe supportsRowValueConstructorPredicateAndSubqueryPredicateInLogicalExpression(). I assume it is the same problem with all forms of logical expressions (=, !=, >, etc), not just IN? Could you verify that? We might want to consider consolidating these together as well into a composite class that reports the dialects level of tuple support. That unfortunately would have to wait for the next major rev. > > > Why would the third query fall into > > supportsRowValueConstructorSyntaxInInList? > Taken into consideration the grow of Dialect class and based on the > table posted here: > http://lists.jboss.org/pipermail/hibernate-dev/2012-May/008511.html. My point is just that the third query does not involve an IN expression. So why would it fall under supportsRowValueConstructorSyntax*InInList*? -- st...@hibernate.org http://hibernate.org _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev