This content has been marked as final.
Show 3 replies
-
1. Re: Revision Type is null (trunk)
adamw Dec 19, 2008 5:18 PM (in response to talios)Hello,
yes, you should of course see 1s there. I create a JIRA bug for that and I'll look at it as soon as possible.
(http://opensource.atlassian.com/projects/hibernate/browse/HHH-3671)
--
Thanks,
Adam -
2. Re: Revision Type is null (trunk)
adamw Dec 22, 2008 12:43 PM (in response to talios)Hello,
I tried running Envers with all settings as specified in the migration manual chepter (except for one small change: auditTableSuffix, not versionsTableSuffix) and all seems to work. Are you able to reproduce the problem?
My settings:<property name="org.hibernate.envers.revisionTypeFieldName">_rev_type</property> <property name="org.hibernate.envers.auditTableSuffix">_versions</property> <property name="org.hibernate.envers.revisionFieldName">_revision</property>
+ a custom revision entity:@Entity @RevisionEntity @Table(name="_revisions_info") public class TestRevisionEntity { @Id @GeneratedValue @RevisionNumber @Column(name="revision_id") private int id; @RevisionTimestamp @Column(name="revision_timestamp") private long timestamp; private String username; public int getId() { return id; } public void setId(int id) { this.id = id; } public long getTimestamp() { return timestamp; } public void setTimestamp(long timestamp) { this.timestamp = timestamp; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
--
Adam -
3. Re: Revision Type is null (trunk)
talios Dec 22, 2008 6:36 PM (in response to talios)Using the latest trunk I'm still seeing my _revision_type columns being null.
Looking at my postgres logs I see the following SQL executed:2008-12-22 14:31:17 NZDT LOG: duration: 0.201 ms parse <unnamed>: insert into smx3.postal_address_versions (address1, address2, attn_name, city, directions, postal_code, to_name, contact_mech_id, _revision) values ($1, $2, $3, $4, $5, $6, $7, $8, $9) 2008-12-22 14:31:17 NZDT LOG: duration: 0.073 ms bind <unnamed>: insert into smx3.postal_address_versions (address1, address2, attn_name, city, directions, postal_code, to_name, contact_mech_id, _revision) values ($1, $2, $3, $4, $5, $6, $7, $8, $9) 2008-12-22 14:31:17 NZDT DETAIL: parameters: $1 = 'CMC House', $2 = 'C-18 Bandra Kurla Complex', $3 = NULL, $4 = 'Mumbai', $5 = NULL, $6 = '400051', $7 = NULL, $8 = '2000220', $9 = '108400'
So I see the _revision field being inserted, but not _revision_type.