Examples of createSQLQuery()


Examples of org.hibernate.classic.Session.createSQLQuery()

    assertEquals(1,s.getNamedQuery( "native-delete-car" ).setString( 0, "NotKirsten" ).executeUpdate());
   
   
    assertEquals(0,s.createSQLQuery( "delete from SUV where owner = :owner" ).setString( "owner", "NotThere" ).executeUpdate());
    assertEquals(1,s.createSQLQuery( "delete from SUV where owner = :owner" ).setString( "owner", "Joe" ).executeUpdate());
    s.createSQLQuery( "delete from PICKUP" ).executeUpdate();

    l = s.createQuery("from Vehicle").list();
    assertEquals(l.size(),0);

View Full Code Here

Examples of org.hibernate.search.FullTextSession.createSQLQuery()

    log( "starting clean up phase" );

    FullTextSession s = Search.getFullTextSession( sf.openSession() );
    try {
      Transaction tx = s.beginTransaction();
      s.createSQLQuery( "delete from book_author where book_id < :id" ).setParameter( "id", initialOffset ).executeUpdate();
      s.createSQLQuery( "delete from book where id < :id" ).setParameter( "id", initialOffset ).executeUpdate();
      s.createSQLQuery( "delete from author where id < :id" ).setParameter( "id", initialOffset ).executeUpdate();

      s.purgeAll( Book.class );
      s.flush();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.