@Test public void testTestUpdateOnTableWithAliasAndFQColumnNameInWhereClause() throws Exception { UpdateAnalyzedStatement statement = analyze("update users t set name = 'foo' where t.name != 'foo'"); Function eqFunction = (Function) ((Function) statement.nestedStatements().get(0).whereClause().query()) .arguments() .get(0); assertThat(eqFunction.arguments().get(0), isReference("name")); }
@Test public void testUsingFQColumnNameShouldBePossibleInWhereClause() throws Exception { UpdateAnalyzedStatement statement = analyze("update users set name = 'foo' where users.name != 'foo'"); Function eqFunction = (Function) ((Function) statement.nestedStatements().get(0).whereClause().query()) .arguments() .get(0); assertThat(eqFunction.arguments().get(0), isReference("name")); }