Package com.avaje.tests.compositekeys.db

Examples of com.avaje.tests.compositekeys.db.ItemKey


        region.setKey(regionKey);
        region.setDescription("Region West - Customer 2");
        getServer().save(region);

        Item item = new Item();
        ItemKey itemKey = new ItemKey();
        itemKey.setCustomer(1);
        itemKey.setItemNumber("ITEM1");
        item.setKey(itemKey);
    item.setUnits("P");
        item.setDescription("Fancy Car - Customer 1");
        item.setRegion(500);
        item.setType(10);
        getServer().save(item);

        item = new Item();
        itemKey = new ItemKey();
        itemKey.setCustomer(2);
        itemKey.setItemNumber("ITEM1");
        item.setKey(itemKey);
    item.setUnits("P");
        item.setDescription("Another Fancy Car - Customer 2");
        item.setRegion(500);
        item.setType(10);
View Full Code Here


  /**
   * This partially loads the item and then lazy loads the ManyToOne assoc
   */
  public void testDoubleLazyLoad()
  {
    ItemKey itemKey = new ItemKey();
    itemKey.setCustomer(2);
    itemKey.setItemNumber("ITEM1");
   
    Item item = getServer().find(Item.class).select("description").where().idEq(itemKey).findUnique();
    assertNotNull(item);
    assertNotNull(item.getUnits());
    assertEquals("P", item.getUnits());
View Full Code Here

TOP

Related Classes of com.avaje.tests.compositekeys.db.ItemKey

Copyright © 2018 www.massapicom. 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.