title: In ActiveAndroid Is it possible to update a specific field in a table row without wiping out the rest of the data in the row
body: <p>ActiveAndroid:</p>
  
  <p>I need to push updates to specific table fields without wiping out any existing data in the row if i dont happen to save() data for all fields each time.</p>
  
  <p>For example:</p>
  
  <p>I have a table named 'user' which contains the following fields:</p>
  
  <p>extSrc | extId | email | firstName | lastName | role | photo | userId | verified</p>
  
  <p>If i save data to all fields except 'verified' and then I later need to update only the verified field - is this possible?</p>
  
  <p>Currently when i use the code below, all fields except userId (which i have stored locally) and verified are populated, all other fields are cleared. At the time that i have the verified value that i need to update i dont have the additional user data to push / save() so i only need to update the specific 'verified' field when the userId matches a userId in the user table and leave all other fields for that user as they are.</p>
  
  <p>My code:</p>
  
  <p>Model:</p>
  
  <pre><code>    // define table name
      @Table(name = "User")
  
      public class User extends Model 
      {
      // define table columns
  
      @Column(name = "extSrc")
      public String extSrc;
  
      @Column(name = "extId")
      public String extId;
  
      @Column(name = "email")
      public String email;
  
      @Column(name = "firstName")
      public String firstName;
  
      @Column(name = "lastName")
      public String lastName;
  
      @Column(name = "role")
      public String role;
  
      @Column(name = "photo")
      public String photo;
  
      @Column(name = "userId", unique = true, onUniqueConflict = Column.ConflictAction.REPLACE)
      public String userId;
  
      @Column(name = "verified")
      public String verified;
      }
  
  
  controller:
  
  
      public class UserAdapter implements JsonDeserializer {
  
      @Override
      public User deserialize(JsonElement arg0, Type arg1,
          JsonDeserializationContext arg2) throws JsonParseException {
  
              User u = new User();
  
              Log.v("user", u.toString());
  
              JsonObject j = (JsonObject) arg0;
  
              Log.v("j", j.toString());
  
  
              if(j.has("extSrc"))
              {
                  u.extSrc = j.get("extSrc").getAsString();
                  Log.v("extSrc", u.extSrc);
              }
              else
              {
                  Log.v("extSrc", "does not exist");
              }
  
  
              if(j.has("extId"))
              {
                  u.extId = j.get("extId").getAsString();
                  Log.v("extId", u.extId);
              }
              else
              {
                  Log.v("extId", "does not exist");
              }
  
  
              if(j.has("email"))
              {
                  u.email = j.get("email").getAsString();
                  Log.v("email", u.email);
              }
              else
              {
                  Log.v("email", "does not exist");
              }
  
  
              if(j.has("firstName"))
              {
                  u.firstName = j.get("firstName").getAsString();
                  Log.v("firstName", u.firstName);
              }
              else
              {
                  Log.v("firstName", "does not exist");
              }
  
  
              if(j.has("lastName"))
              {
                  u.lastName = j.get("lastName").getAsString();
                  Log.v("lastName", u.lastName);
              }
              else
              {
                  Log.v("lastName", "does not exist");
              }
  
  
              if(j.has("role"))
              {
                  u.role = j.get("role").getAsString();
                  Log.v("role", u.role);
              }
              else
              {
                  Log.v("role", "does not exist");
              }
  
  
              if(j.has("photo"))
              {
                  u.photo = j.get("photo").getAsString();
                  Log.v("photo", u.photo);
              }
              else
              {
                  Log.v("photo", "does not exist");
              }
  
  
              if(j.has("userId"))
              {
                  u.userId = j.get("userId").getAsString();
                  Log.v("userId", u.userId);
              }
              else
              {
                  Log.v("userId", "does not exist");
              }
  
  
              if(j.has("verified"))
              {
                  u.userId = SpontlyApplication.PREFS_USER_ID;
                  u.verified = j.get("verified").getAsString();
  
                  Log.v("verified", u.verified);
              }
              else
              {
                  u.verified = "true";
                  Log.v("verified", "does not exist");
              }
  
       u.save();
  
       }   
  </code></pre>
  
  <p>Thanks.</p>