Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While loading a fixture, don't set properties unless specifically in the load file. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Feb 4, 2012

I'm not really sure if this patch is correct, so take it with a grain of salt, but I was having an issue with a model like:

  public byte[] salt;
  public byte[] hashedPassword;


  void setPassword(String password) {
    // set salt and hashedPassword
  }

I could load a fixture:

User(ckent):
password: password

which would call the setPassword function through the BeanWrapper, but then the fields got cleared out by the pre-patch block (it sets each byte[] field, regardless if it is explicitly set in the yaml.) The new code only sets values if explicitly set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant