w7cook / OpenBook

a project to create a basic social networking site
http://www.cs.utexas.edu/~wcook/Courses/devclass/index.htm
25 stars 20 forks source link

Bootstrap defaultPhoto variables reset upon recompilation #260

Closed ellio closed 12 years ago

ellio commented 12 years ago

Try this:

1) Start play - make sure not to save any java files once its started 2) Create a new user 3) Confirm the signup for the user

Everything should work fine.

Now do this:

1) Edit some java file - adding a comment or somesuch should be enough. 2) Create a new user 3) Confirm the signup for the user

The following error occurs: "this.profilePhoto = Photo.findById(Bootstrap.defaultProfilePhotoID);" This is because it sees Bootstrap.defaultProfilePhotoID as null now.

amshali commented 12 years ago

@laurenyew , @jtessler Please have a look at this. I kinda suspect it might be lack of correct tagging on User and Profile relation.

laurenyew commented 12 years ago

Ok. The basic reason for using the profile picture ID was to try to avoid hard coding. I think that now that we have photo objects for the profile picture, I can take out the use of those static variables. I'll take a look