Examples of InvRefChildModel


Examples of org.slim3.json.test.issue103.InvRefChildModel

import org.slim3.tester.AppEngineTestCase;

public class InverseModelRefAttrModelTest extends AppEngineTestCase{
    @Test
    public void modelToJson() throws Exception {
        InvRefChildModel child1 = new InvRefChildModel();
        InvRefChildModel child2 = new InvRefChildModel();
        InvRefParentModel parent = new InvRefParentModel();
        child1.setName("child1");
        child1.getParentRef().setModel(parent);
        child2.setName("child2");
        child2.getParentRef().setModel(parent);
        parent.setName("parent");
        parent.getRef().setModel(child1);
        Datastore.put(child1, child2, parent);

        String json = meta.modelToJson(parent, 1);
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.