Added the sparse option to deal with one-to-one associations