Examples of enableFilter()


Examples of org.hibernate.Session.enableFilter()

    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TestData testData = new TestData();
    testData.prepare();

    Session session = openSession();
    session.enableFilter( "region" ).setParameter( "region", "APAC" );

    Salesperson salesperson = ( Salesperson ) session.get( Salesperson.class, testData.steveId );
    assertNotNull( salesperson );
    assertEquals( "Incorrect order count", 1, salesperson.getOrders().size() );
View Full Code Here

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

    return new FunctionalTestClassTestSuite( UnionSubclassFilterTest.class );
  }

  public void testFiltersWithUnionSubclass() {
    Session s = openSession();
    s.enableFilter( "region" ).setParameter( "userRegion", "US" );
    Transaction t = s.beginTransaction();

    prepareTestData( s );
    s.clear();
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.