-
1. Re: Problem auditing joined inheritance.
adamw Feb 1, 2010 10:28 AM (in response to andystone)1 of 1 people found this helpfulHello,
did you generate the audit schema by hand or using the envers hbm2ddl task?
The problem is probably a superflous "rev" column in the table corresponding to the sub-class (as the revision is already specified in the superclass).
Adam
-
2. Re: Problem auditing joined inheritance.
andystone Feb 1, 2010 10:35 AM (in response to adamw)I generated the tables by hand, but the sub tables have to have REV otherwise the primary key would be incomplete.
Without REV on the inheriting table, there would be no way of distinguishing between versions.
Cheers,
Andy,
-
3. Re: Problem auditing joined inheritance.
adamw Feb 1, 2010 10:53 AM (in response to andystone)1 of 1 people found this helpfulRight, sorry, I was thinking of course about REVTYPE, as that's the column you don't need in the subtable.
If the error message is indeed about REV, then it's quite weird ... what DB are you using? And which frameworks?
Adam
-
4. Re: Problem auditing joined inheritance.
andystone Feb 1, 2010 11:14 AM (in response to adamw)MYSQL version 5.1.
Seam 2.2
Envers 1.2.2
JDK 1.6.0_17
JBOSS 5.1.0.GA
HIbernate 3.3.1.GA
Cheers,
Andy.
-
5. Re: Problem auditing joined inheritance.
adamw Feb 1, 2010 11:41 AM (in response to andystone)That should work fine.
Can you paste in the complete stack trace you are getting?
And maybe also the entities that you are using?
Adam
-
6. Re: Problem auditing joined inheritance.
andystone Feb 1, 2010 11:59 AM (in response to adamw)Thanks for your help I now know what the problem was.
Due to doing everything manually, I had added REV to the base table.
Fixing that then left the problem you pointed out above i.e. that REVTYPE is not required on the sub tables.
Thanks for your help and thanks for a very useful product.
Cheers,
Andy.