Foros de discusión
db-name and legacy schema
Thiago Henrique Carvalho Prudente, modificado hace 7 años.
db-name and legacy schema
New Member Mensajes: 21 Fecha de incorporación: 15/06/15 Mensajes recientes
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 hace 7 años.
RE: db-name and legacy schema
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
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 hace 7 años.
RE: db-name and legacy schema
New Member Mensajes: 21 Fecha de incorporación: 15/06/15 Mensajes recientesDavid 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!