[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077?page=c...
]
Emmanuel Bernard commented on HHH-4077:
---------------------------------------
From Dmitry Geraskov
public class TestNamingStrategy extends DefaultNamingStrategy{
public String propertyToColumnName(String propertyName) { return
"PTCN_"+propertyName;}
public String columnName(String columnName) {return "CN_"+columnName; }
public String logicalColumnName(String columnName, String
propertyName) { return "LCN_"+super.logicalColumnName(columnName,
propertyName);}
}
@Entity
public class Customers implements java.io.Serializable {
@Id @Column(name="id") private int id;
@Column(name = "specified_column") private String specified_column;
...
}
-----------------------------------------------------------------------
Class mapped as:
<class name="r.Customers">
<id name="id" column="id" type="int"/>
<property name="specified_column" column="specified_column"
/>
</class>
Generated ddl for jpa console configuration is
create table Customers (
CN_id int4 not null,
CN_specified_column varchar(255),
primary key (CN_id)
);
-------
for core:
create table Customers (
CN_LCN_id int4 not null,
CN_LCN_specified_column varchar(255),
primary key (PTCN_id)
)
Misuse of NamingStrategy and logical column names in HbmBinder
--------------------------------------------------------------
Key: HHH-4077
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4077
Project: Hibernate Core
Issue Type: Bug
Components: metamodel
Affects Versions: 3.3.2
Reporter: Emmanuel Bernard
Assignee: Emmanuel Bernard
Fix For: 3.5
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira