掲示板

Service-builder foreignkeys and column length

thumbnail
13年前 に Puj Z によって更新されました。

Service-builder foreignkeys and column length

Regular Member 投稿: 220 参加年月日: 10/01/14 最新の投稿
Hi,

I have not found anything regarding defining forein keys when using service builder. Is there a way to do that? If not, what is the reason? Because technically it doesn't seem to be difficult.

Another thing I have not found is how to define length for columns (for example with the type "String"). A default value of 75 is generated when a column is created in mysqll (varchar(75)) and then we have to manually change this, which is not an ideal way because the whole table is replaced after running service.xml later.

Is there any solutions\workarounds for this? Any help would rescue a desperate man!
thumbnail
13年前 に Henrique Simoes de Andrade によって更新されました。

RE: Service-builder foreignkeys and column length

Regular Member 投稿: 165 参加年月日: 10/04/30 最新の投稿
Hi,

Foreign keys: I have the same problem.

Columns length: locate portlet-model-hints.xml in your project, there you can define length and other things for columns. Example:
		<field name="kaleoNodeName" type="String">
			<hint name="max-length">200</hint>
		</field>


HTH
thumbnail
13年前 に Puj Z によって更新されました。

RE: Service-builder foreignkeys and column length

Regular Member 投稿: 220 参加年月日: 10/01/14 最新の投稿
Hi Henrique,

thanks, but the problem is this file is being overwritten if you run service-builder again, right?

Is there any persistent solution?
thumbnail
13年前 に Henrique Simoes de Andrade によって更新されました。

RE: Service-builder foreignkeys and column length

Regular Member 投稿: 165 参加年月日: 10/04/30 最新の投稿
ehe no... this file is not overwritten.

You can edit without problem, there is a wiki http://www.liferay.com/community/wiki/-/wiki/1071674/Customize+DB+Column+Sizes/maximized with some tips about model-hints.

When run ant build-service, these changes aren't discarted.

Take a look here: http://www.liferay.com/community/wiki/-/wiki/1071674/Service+Builder+and+Liferay+Database+Table+Creation/maximized and here http://www.liferay.com/web/guest/community/forums/-/message_boards/message/3857549
thumbnail
13年前 に Puj Z によって更新されました。

RE: Service-builder foreignkeys and column length

Regular Member 投稿: 220 参加年月日: 10/01/14 最新の投稿
Hi Henrique,

Thanks! I was not able to find this article, very useful! emoticon

I hope someone can also provide an answer on foreign-keys in Service-builder.
thumbnail
13年前 に Puj Z によって更新されました。

RE: Service-builder foreignkeys and column length

Regular Member 投稿: 220 参加年月日: 10/01/14 最新の投稿
While searching, I stumbled upon some news claiming that service-builder in liferay6.1 will offer many to many relationship. If anyone has more info on this, please share.
thumbnail
13年前 に Scott Rabon によって更新されました。

RE: Service-builder foreignkeys and column length

Junior Member 投稿: 48 参加年月日: 10/04/15 最新の投稿
Try looking in the DTD file of the service.xml file. There is a lot of helpful info in there. The URL is http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd.
6年前 に Deepak pal によって更新されました。

RE: Service-builder foreignkeys and column length

New Member 投稿: 15 参加年月日: 16/03/09 最新の投稿
thanks, but the problem is this file is being overwritten if you run service-builder again, right?

Is there any persistent solution?

Hi Puj Z,
Can you provide me solution how we can icrease coulomn size of a table. And if i run service builder it should be remain same . Actually facing problem when i run build service then all the changage done by me lost and default size set 75 varchar.

Thanks for any suggetion.
thumbnail
11年前 に Piyush Ramani によって更新されました。

RE: Service-builder foreignkeys and column length

New Member 投稿: 1 参加年月日: 13/03/16 最新の投稿
Thanks it really helpful to me..