hmkurth / CommunityFoodResources

locate community food resources
1 stars 0 forks source link

week 5 ready for review #3

Closed hmkurth closed 3 years ago

hmkurth commented 3 years ago

@pawaitemadisoncollege Working on getting the logging just right with hibernate filepaths, I’ve been getting errors that the files can’t be renamed, so I tried renaming and moving, I fixed the error for now, but my hibernate logs aren’t I the right place with the right name…so… *I think I fixed it by removing a colon in the filename, but I very well may have screwed it up…will have to monitor logs

Sat 2/20 : 4 hrs Working on the userRole dao and testing, after implementing the .equals method I have a lot of failing tests Sunday 2 hrs: I went too far in implementing the .equals method, and did it for the userRole dao, too, which was what was leading to all the problems I was having. I am still having a problem with inserting a role without a username, so for now I have made that column not null, so I will have to monitor that as well. I don’t think I ever got that student liscense from IntelliJ, so now my sessions are limited to 30 minutes..have to check on that… I haven’t gotten as far as I wanted to on my project ☹. There are a lot of little details to get right with the hibernate Db setup, I’m dreading it a little.

pawaitemadisoncollege commented 3 years ago

Good work @hmkurth. I think you are making really good progress! In fact, you are pretty close to complete with Checkpoint 2, which isn't due until next week!

A few things to keep in mind as you continue work in the coming weeks:

I think if you search through the log4j2.properties file and replace {filepath} with {filename} that will fix the odd directory. oh, and you should also delete the directory name ${filepath} that was created as a result.

hmkurth commented 3 years ago

I'm having problems with this part: Think about testing the delete scenarios in one-to-many relationships more fully. For example, if a user is deleted, what should happen to that user's roles? What if a role is deleted? Write tests to make sure whatever should happen, does happen.

pawaitemadisoncollege commented 3 years ago

Ok! Let's start with this: what are your one to many relationships?

hmkurth commented 3 years ago

well, just for the user/roles tables, there should be one user to many roles, so if a user is deleted, so should all corresponding roles. However, if a role is deleted, i wouldn't want the user to be deleted. I have the cascade on delete annotation. I posted in slack week 5 under Robert's issue, which has the same error, for reference.

pawaitemadisoncollege commented 3 years ago

That business rule makes sense. So, I responded to your message in slack before I saw this - your annotations looked correct at first glance. Might be helpful to also share the db design out there.