Manage Bi-temporal Data [message #1626055] |
Fri, 20 February 2015 15:07  |
Eclipse User |
|
|
|
Hi
I have a bitemporal database, each table will have active record and expired record( active record is record with current date is between stDate and endDate), below is example
Seller has items..
now item table has start and end date when we want to expire item we simply change the expire date to past date.
While writing Named query we can write stDate >current date and endDate <current Date. But I want to generalized this so every time I query any table it will bring only active record. I have more than 100 table so I am looking for way to configure so my JPA will always fetch active record.
What I mean is database has a star table if I query with JPA eager fetch it is getting all the record(active as well as expired) from all the joined table.
Note this is read only service so I am not worried about write/update operation.
Any suggestion will be great help.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03241 seconds