Hi,
I am moving from Doctrine ORM in PHP to Hibernate. In Doctrine it supports a secondary table to keep entity versions, so I can keep a full history of all records of the entity. Well - thats PHP and Doctrine, I want to move my tables across to Hibernate and a JBoss backend.
Is there any way to do versioned objects in Hibernate?
Hope so - thanks, Philip
p.s.
http://www.doctrine-project.org/documen ... ersionable
CREATE TABLE blog_post_version (id BIGINT,
title VARCHAR(255),
body LONGTEXT,
version BIGINT,
PRIMARY KEY(id,
version)) ENGINE = INNODB
CREATE TABLE blog_post (id BIGINT AUTO_INCREMENT,
title VARCHAR(255),
body LONGTEXT,
version BIGINT,
PRIMARY KEY(id)) ENGINE = INNODB
ALTER TABLE blog_post_version ADD FOREIGN KEY (id) REFERENCES blog_post(id) ON UPDATE CASCADE ON DELETE CASCADE