Package org.javalite.activejdbc.test_models

Examples of org.javalite.activejdbc.test_models.Comment


    public void shouldRemovePolymorphicChildren() {
        deleteAndPopulateTables("articles", "posts", "comments");
        Article a = Article.findById(1);
        a.add(Comment.create("author", "ipolevoy", "content", "this is just a test comment text"));
        a.add(Comment.create("author", "rkinderman", "content", "this is another test comment text"));
        Comment c = (Comment) Comment.findAll().limit(1).orderBy("id").get(0);
        a.remove(c);
        a(Comment.findAll().size()).shouldBeEqual(1);
    }
View Full Code Here

TOP

Related Classes of org.javalite.activejdbc.test_models.Comment

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.