Hibernate Revenge Ignores column exclude="true"

#1

I am attempting to use Hibernate Tools to reverse a SQL Server Database having some 700+ tables.

I have generated a hibernate.revenge.xml files and configured to exclude certain columns. for example in the following section I have configured the ROWID column for exclude=“true”. However, the generated pojo still has the property rowid present.


<table name=" PURCHASE_DIST" class="PurchaseDist">
<primary-key>
<key-column name="PURC_ORDER_ID" jdbc-type="NVARCHAR" property="purcOrderId"/>
<key-column name="DIST_NO" jdbc-type="SMALLINT" property="distNo"/>
<key-column name="ENTRY_NO" jdbc-type="SMALLINT" property="entryNo"/>
<key-column name="CURRENCY_ID" jdbc-type="NVARCHAR" property="currencyId"/>
</primary-key>
<column name="ROWID" jdbc-type="INTEGER" property="rowid" exclude="true"/>
<column name="AMOUNT" jdbc-type="DECIMAL" property="amount"/>
<column name="AMOUNT_TYPE" jdbc-type="NVARCHAR" property="amountType"/>
<column name="GL_ACCOUNT_ID" jdbc-type="NVARCHAR" property="glAccountId"/>
<column name="SITE_ID" jdbc-type="NVARCHAR" property="siteId"/>
<column name="POSTING_STATUS" jdbc-type="NCHAR" property="postingStatus"/>
<column name="POSTING_DATE" jdbc-type="TIMESTAMP" property="postingDate"/>
<column name="BATCH_ID" jdbc-type="NVARCHAR" property="batchId"/>
<column name="CREATE_DATE" jdbc-type="TIMESTAMP" property="createDate"/>
<column name="USER_ID" jdbc-type="NVARCHAR" property="userId"/>
<column name="NATIVE" jdbc-type="NCHAR" property="nativex"/>
</table> 

See here

package com.bolsover.hibernate.visual904.pojo;
// Generated 26-Mar-2019 14:04:25 by Hibernate Tools 5.2.11.Final

import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * PurchaseDist generated by hbm2java
 */
@Entity
@Table(name = "PURCHASE_DIST", schema = "dbo", catalog = "VISUAL904")
public class PurchaseDist implements java.io.Serializable {

	private PurchaseDistId id;
	private Account account;
	private Currency currency;
	private JournalBatch journalBatch;
	private PurchaseOrder purchaseOrder;
	private Site site;
	private Integer rowid;
	private BigDecimal amount;
	private Character amountType;
	private Character postingStatus;
	private LocalDateTime postingDate;
	private LocalDateTime createDate;
	private String userId;
	private Character native_;

	public PurchaseDist() {
	}

Am I doing something wrong or is this a bug?

Regards David Bolsover

0 Likes