Skip to content

Instantly share code, notes, and snippets.

@dadamssg
Created June 21, 2013 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dadamssg/5828611 to your computer and use it in GitHub Desktop.
Save dadamssg/5828611 to your computer and use it in GitHub Desktop.
Line 42 is line 4 in this gist
@Override
public boolean attach(Model model) {
Integer affected
= dataSource
.update(baseModel.getTable())
.setValue(columnName, model.getId())
.only(criteria()
.where(baseModel.getIdField(), "=", baseModel.getId()))
.x();
return affected == 1;
}
ERROR!
java.lang.NullPointerException
at com.fresh.core.relationships.HasOne.attach(HasOne.java:42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment