Vote count:
0
I am trying to create a list of objects that contains different types of logs from my db. I would like to build the list such that the order is by most recently made (a date created field that's in each of the tables).
So is the only way to do it by getting each list (4 different kinds of logs) and then cycle through them and put them in the new list by comparing them and getting the most recent one each time? This seems like it could take a long time if the list are really long which they may or may not be.
IS there a better way to do it with Hibernate where I could put all the tables together and have it do the work for me? The tables don't share any keys or anything for a normal join?
Any suggestions would be helpful.
contactLog has columns (Id, memberId, phonenumber, email, address, dateChanged)
salaryLog has columns (Id, memberId, salary, dateChanged)
relationsLog has columns (Id, memberId, relationId, dateChanged)
personalInfoLog has columns (Id, memberId, height, weight, eyeColor, hairColor, dateChanged)
The purpose of these logs is to indicate anytime someone changes information and Im trying to provide the user with a audit page that will show all changes to these different objects.
Aucun commentaire:
Enregistrer un commentaire