[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-986) <meta attribute="scope-field">protected</meta> does not work

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Wed Sep 12 07:23:14 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28066 ] 

Max Rydahl Andersen commented on HBX-986:
-----------------------------------------

eh *none* of the meta's take effect so i don't think this is related to the meta attribute.

it is more to do with your matching rules...e.g. TAB.* probably doesn't match table1 because of casing differences.

> <meta attribute="scope-field">protected</meta> does not work
> ------------------------------------------------------------
>
>                 Key: HBX-986
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-986
>             Project: Hibernate Tools
>          Issue Type: Bug
>          Components: reverse-engineer
>         Environment: Oracle 9i, Eclipse 3.2
>            Reporter: Tao Liu
>
> The table is as below.
> CREATE TABLE SVW.table1 (
>   col1 CHAR(3) NOT NULL, 
>   col2 NUMBER,
>   col3 VARCHAR(28) NOT NULL,
>   PRIMARY KEY(col1) );
> My reveng.xml is 
> <hibernate-reverse-engineering>
> 	<table-filter match-schema="SVW" match-name="TAB.*">
> 		<meta attribute="extra-import">ep.base.data.po.BasePO</meta>
> 		<meta attribute="extends">BasePO</meta>
> 		<meta attribute="scope-field">protected</meta>
> 	</table-filter>
> </hibernate-reverse-engineering>
>   
> When I generate code with annotations from Oracle 9i, the result is as below. The filed is still private.
> package acl;
> // Generated 2007-9-11 19:14:17 by Hibernate Tools 3.2.0.b9
> import java.math.BigDecimal;
> import javax.persistence.Column;
> import javax.persistence.Entity;
> import javax.persistence.GeneratedValue;
> import static javax.persistence.GenerationType.SEQUENCE;
> import javax.persistence.Id;
> import javax.persistence.SequenceGenerator;
> import javax.persistence.Table;
> /**
>  * Table1 generated by hbm2java
>  */
> @Entity
> @Table(name = "TABLE1", schema = "SVW")
> public class Table1 implements java.io.Serializable {
> 	private String col1;
> 	private BigDecimal col2;
> 	private String col3;
> 	public Table1() {
> 	}
> 	public Table1(String col3) {
> 		this.col3 = col3;
> 	}
> 	public Table1(BigDecimal col2, String col3) {
> 		this.col2 = col2;
> 		this.col3 = col3;
> 	}
> 	@SequenceGenerator(name = "generator", sequenceName = "TABLE1_ID_SEQ1")
> 	@Id
> 	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
> 	@Column(name = "COL1", unique = true, nullable = false, length = 3)
> 	public String getCol1() {
> 		return this.col1;
> 	}
> 	public void setCol1(String col1) {
> 		this.col1 = col1;
> 	}
> 	@Column(name = "COL2", precision = 22, scale = 0)
> 	public BigDecimal getCol2() {
> 		return this.col2;
> 	}
> 	public void setCol2(BigDecimal col2) {
> 		this.col2 = col2;
> 	}
> 	@Column(name = "COL3", nullable = false, length = 28)
> 	public String getCol3() {
> 		return this.col3;
> 	}
> 	public void setCol3(String col3) {
> 		this.col3 = col3;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list