Fórum
db-name and legacy schema
Thiago Henrique Carvalho Prudente, modificado 7 Anos atrás.
db-name and legacy schema
New Member Postagens: 21 Data de Entrada: 15/06/15 Postagens Recentes
good afternoon,
I have a system that I can't change the column of the tables, but the attribute names have underline, like customer_id.
And I want to follow Java name convention, so the attribute names have to be like customerId.
How should be the xml mapping on the service file?
I've been doing some researches and I guess to keep the attribute name of the table I must do as follow:
<column name="customerId" type="Integer" db-name="customer_id"></column>
Am I correct?
Thanks.
I have a system that I can't change the column of the tables, but the attribute names have underline, like customer_id.
And I want to follow Java name convention, so the attribute names have to be like customerId.
How should be the xml mapping on the service file?
I've been doing some researches and I guess to keep the attribute name of the table I must do as follow:
<column name="customerId" type="Integer" db-name="customer_id"></column>
Am I correct?
Thanks.
David H Nebinger, modificado 7 Anos atrás.
RE: db-name and legacy schema
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Yep. There's a table-name attribute on the entity for the match on the table name and db-name on the columns to bind against legacy names.
Thiago Henrique Carvalho Prudente, modificado 7 Anos atrás.
RE: db-name and legacy schema
New Member Postagens: 21 Data de Entrada: 15/06/15 Postagens RecentesDavid H Nebinger:
Yep. There's a table-name attribute on the entity for the match on the table name and db-name on the columns to bind against legacy names.
Thank you so much!