Got both fixed :
@Test public void Delete_with_SubQuery_exists(){ QSurvey survey1 = new QSurvey("s1"); QEmployee employee = new QEmployee("e"); SQLDeleteClause delete = new SQLDeleteClause(connection, SQLTemplates.DEFAULT,survey1); delete.where(survey1.name.eq("XXX"), new SQLSubQuery().from(employee).where(survey1.id.eq(employee.id)).exists()); assertEquals("delete from SURVEY\n" + "where SURVEY.NAME = ? and exists (select 1\n" + "from EMPLOYEE2 e\n" + "where SURVEY.ID = e.ID)", delete.toString()); }
Got both fixed :
@Test with_SubQuery_ exists( ){
SQLDeleteClaus e delete = new SQLDeleteClause (connection, SQLTemplates. DEFAULT, survey1) ;
delete. where(survey1. name.eq( "XXX"), new SQLSubQuery( ).from( employee) .where( survey1. id.eq(employee. id)).exists( ));
assertEquals( "delete from SURVEY\n" +
"where SURVEY.NAME = ? and exists (select 1\n" +
"where SURVEY.ID = e.ID)", delete.toString());
public void Delete_
QSurvey survey1 = new QSurvey("s1");
QEmployee employee = new QEmployee("e");
"from EMPLOYEE2 e\n" +
}