掲示板

db-name and legacy schema

thumbnail
7年前 に Thiago Henrique Carvalho Prudente によって更新されました。

db-name and legacy schema

New Member 投稿: 21 参加年月日: 15/06/15 最新の投稿
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.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: db-name and legacy schema

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
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.
thumbnail
7年前 に Thiago Henrique Carvalho Prudente によって更新されました。

RE: db-name and legacy schema

New Member 投稿: 21 参加年月日: 15/06/15 最新の投稿
David 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!