开发者

Hibernate get last update timestamp

开发者 https://www.devze.com 2023-03-06 12:16 出处:网络
is there any way to get a t开发者_开发问答imestamp of last update/save/delete of an entity (class/table)?

is there any way to get a t开发者_开发问答imestamp of last update/save/delete of an entity (class/table)?

One solution that occured to me is setting some temporal property, but it requires change of DB schema and I dont really need the information when all entities were changed, I need only to know, that something has changed since my last lookup.

Other solution might be using hibernate events, but i think that its also an overkill...

So, is there any way to get this information from some hibernate class? Hibernate may have this info saved internally...

Thanks.


I have solved this issue using Hibernate interceptors. If you know about any better solution, please let me know.

0

精彩评论

暂无评论...
验证码 换一张
取 消