JPA的历史 [英] History with JPA

查看:58
本文介绍了JPA的历史的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以一些棘手的方式保持对实体的更改.所有具有这样结构的实体都有一个HISTORY表 TABLE ATTR VALUE DATE TYPE (插入/更新/删除)

I need to keep change of entities in a little bit tricky fashion. There is one HISTORY table for all entities with structure something like this TABLE ATTR VALUE DATE TYPE(insert/update/delete)

由于我是JPA的新手,所以我不知道如何使用JPA实现这一目标.还是为此目的使用JDBC更好?

As I am quite novice in JPA I don't realize how to achive this using JPA. Or it's better to use JDBC for this purpose?

UPD:JPA实现是EclipseLink

UPD: JPA implementation is EclipseLink

推荐答案

JPA本身对此没有解决方案,因此您必须使用特定于实现的解决方案.

JPA itself does not have a solution for this, so you have to use implementation specific solutions.

对于您的实现,请尝试,然后选中

For your implementation, try this and check this.

这篇关于JPA的历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆