掲示板
Liferay Service Builder - Column of type Collection (List<String>)
6年前 に Julian Perez によって更新されました。
Liferay Service Builder - Column of type Collection (List<String>)
New Member 投稿: 1 参加年月日: 17/07/25 最新の投稿
I am newbie to Liferay. I would like to build with Service Builder the following column for the entity Traveller:
<entity name="Traveller" local-service="true" remote-service="true">
<column name="citiesList" type="Collection"></column>
</entity>
When I run the service Builder, in the class TravellerModel.java the corresponding get/set methods are not generated.
I have tried the following solution without success:
<column name="citiesList" type="Collection" entity="java.lang.String"></column>
Can someone tell me how I can define a list of Strings (List<String>) in Liferay Service Builder?
Thanks in advance.
<entity name="Traveller" local-service="true" remote-service="true">
<column name="citiesList" type="Collection"></column>
</entity>
When I run the service Builder, in the class TravellerModel.java the corresponding get/set methods are not generated.
I have tried the following solution without success:
<column name="citiesList" type="Collection" entity="java.lang.String"></column>
Can someone tell me how I can define a list of Strings (List<String>) in Liferay Service Builder?
Thanks in advance.
6年前 に David H Nebinger によって更新されました。
RE: Liferay Service Builder - Column of type Collection (List<String>)
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿Julian Perez:
Can someone tell me how I can define a list of Strings (List<String>) in Liferay Service Builder?
Liferay cannot persist this. You need to marshal it to/from a String and persist it as a single value.
You can automate this of course by adding the List support and marshaling in the XxxImpl class.
Come meet me at Devcon 2017 or 2017 LSNA!