Package org.nutz.dao.test.meta

Examples of org.nutz.dao.test.meta.BeanWithDefault


     * For issue #84
     */
    @Test
    public void test_updateIgnoreNull_width_default() {
        dao.create(BeanWithDefault.class, true);
        BeanWithDefault bean = new BeanWithDefault();
        bean.setName("abc");
        dao.insert(bean);

        BeanWithDefault b2 = dao.fetch(BeanWithDefault.class);
        assertEquals("--", b2.getAlias());

        b2.setAlias("AAA");
        dao.update(b2);

        b2 = dao.fetch(BeanWithDefault.class, "abc");
        assertEquals("AAA", b2.getAlias());

        b2.setAlias(null);
        dao.updateIgnoreNull(b2);

        b2 = dao.fetch(BeanWithDefault.class, "abc");
        assertEquals("AAA", b2.getAlias());
    }
View Full Code Here

TOP

Related Classes of org.nutz.dao.test.meta.BeanWithDefault

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.