Package com.scooterframework.orm.activerecord

Examples of com.scooterframework.orm.activerecord.ActiveRecord.update()


        ActiveRecord entry = null;
        try {
            entry = Entry.findById(p("id"));
            if (entry != null) {
                entry.setData(params());
                entry.update();
                flash("notice", "Entry was successfully updated.");

                return redirectTo(R.resourceRecordPath("entries", entry));
            }
            else {
View Full Code Here


        ActiveRecord entry = null;
        try {
            entry = Entry.findById(p("id"));
            if (entry != null) {
                entry.setData(params());
                entry.update();
                flash("notice", "Entry was successfully updated.");
            }
            else {
                flash("notice", "There is no entry record with primary key id as " + p("id") + ".");
            }
View Full Code Here

        ActiveRecord pet = null;
        try {
            pet = Pet.where("id=" + p("id")).includes("owner").getRecord();
            if (pet != null) {
                pet.setData(params());
                pet.update();
                flash("notice", "Pet was successfully updated.");

                return redirectTo(R.resourceRecordPath("owners", pet.associated("owner").getRecord()));
            }
            else {
View Full Code Here

        ActiveRecord owner = null;
        try {
            owner = Owner.where("id=" + p("id")).getRecord();
            if (owner != null) {
                owner.setData(params());
                owner.update();
                flash("notice", "Owner was successfully updated.");

                return redirectTo(R.resourceRecordPath("owners", owner));
            }
            else {
View Full Code Here

        ActiveRecord post = null;
        try {
            post = Post.findById(p("id"));
            if (post != null) {
                post.setData(params());
                post.update();
                flash("notice", "Post was successfully updated.");
               
                return redirectTo(R.resourceRecordPath("posts", post));
            }
            else {
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.