Unable to create entity because column name exceeds 30 charactersUnable to create entity because column name exceeds 30 charactershttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1102490652024-03-28T11:16:03Z2024-03-28T11:16:03ZRE: Unable to create entity because column name exceeds 30 charactersOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1183202912020-01-23T08:45:27Z2020-01-23T08:45:27ZSee <a href="https://issues.liferay.com/browse/LRDOCS-5449">https://issues.liferay.com/browse/LRDOCS-5449 </a>for an alternative solutionOlaf Kock2020-01-23T08:45:27ZRE: Unable to create entity because column name exceeds 30 charactersPankaj Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1183198282020-01-23T03:39:28Z2020-01-23T03:39:28ZIt's worked for me in DXP 7.2Pankaj Kumar2020-01-23T03:39:28ZRE: Unable to create entity because column name exceeds 30 charactersManushi Janihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1181636602019-12-28T23:30:32Z2019-12-28T23:30:32Z<p>This works perfect for liferay 7.0,7.1,7.2.</p><br /><br /><p>Thanks a lot!!</p>Manushi Jani2019-12-28T23:30:32ZRE: Unable to create entity because column name exceeds 30 charactersManushi Janihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1181633622019-12-28T23:29:12Z2019-12-28T23:29:12Z<blockquote><br /><blockquote><br /> <div class="quote-title">William Berks:</div><br /> <div class="quote"><br /> <div class="quote-content"><br /> <p>The DTD, <a<br /> href="http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd">http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd</a>,<br /> does not define a 'database-name-max-length' attribute for the<br /> service-builder element. If I try to add it anyway, I still get<br /> the name length error when trying to run the service builder.</p><br /> <p> </p><br /> <p>I would love to change the column name, but this is an existing database.</p></div></div></blockquote><br /> This seems to be fixed in<br /> http://www.liferay.com/dtd/liferay-service-builder_7_1_0.dtd. The<br />attribute is now allowed.</blockquote><br />This is not allowed in Liferay 7.2Manushi Jani2019-12-28T23:29:12ZRE: Unable to create entity because column name exceeds 30 charactersKevin Neibargerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1128625862019-03-22T14:39:52Z2019-03-22T14:39:52Z<blockquote>David H Nebinger<p>30 chars sounds like enough, but when you specify the namespace and<br /> use Java-standard naming, SB will create the table as<br /> NAMESPACE_ENTITYNAME and that often will exceed the 30.</p><br /><p> </p></blockquote><br /><br />Is there anyway for the service builder to ignore appending the namespace? In my 6.2 legacy code entities were created without actual tables to serve as placeholders. It was done this way to wrap FinderImpl which called SQL queries. Since the module-hbm.xml appends the namespace for tables we get all kinds of compile errors on the generated classes. Worst case scenario I can pull out these "empty" entities and manually build the api behind them, but it would work better if we could just ignore the namespace appended to the entity name.Kevin Neibarger2019-03-22T14:39:52ZRE: Unable to create entity because column name exceeds 30 charactersJohn O'Flahertyhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1115780832018-11-16T12:03:39Z2018-11-16T12:03:39ZThanks <span
style="color: inherit;font-family: inherit;font-size: 14.0px;">Pasi
Kössi, another reason to move to 7.1 :)</span>John O'Flaherty2018-11-16T12:03:39ZRE: Unable to create entity because column name exceeds 30 charactersPasi Kössihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1115494672018-11-14T14:40:20Z2018-11-14T14:40:20Z<blockquote>
<div class="quote-title">William Berks:</div>
<div class="quote">
<div class="quote-content">
<p>The DTD, <a
href="http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd">http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd</a>,
does not define a 'database-name-max-length' attribute for the
service-builder element. If I try to add it anyway, I still get
the name length error when trying to run the service builder.</p>
<p> </p>
<p>I would love to change the column name, but this is an existing database.</p></div></div></blockquote>
This seems to be fixed in
http://www.liferay.com/dtd/liferay-service-builder_7_1_0.dtd. The
attribute is now allowed.Pasi Kössi2018-11-14T14:40:20ZRE: Unable to create entity because column name exceeds 30 charactersJohn O'Flahertyhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1107207672018-08-16T15:44:01Z2018-08-16T15:44:01Z<p>Hi William,</p>
<p> </p>
<p>I was able to set the following and service builder didn't throw any
issues for me. </p>
<p> </p>
<p><service-builder database-name-max-length="999"
package-path="com.qad.meetingroomdisplays"><br />
<author>j2o</author><br />
<namespace>MeetingRoomDisplays</namespace><br />
<database-name-max-length>999</database-name-max-length><br /> </p>
<p>I hope that helps,</p>
<p> </p>
<p>John</p>
<p> </p>John O'Flaherty2018-08-16T15:44:01ZRE: Unable to create entity because column name exceeds 30 charactersSurendra Khttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1106373292018-07-25T07:46:18Z2018-07-25T07:46:18Z<p>Hi William</p>
<p> </p>
<p>Add databaseNameMaxLength=100 attribute in build.gradle file of your
service module.</p>
<p> </p>
<p>ex</p>
<p> </p>
<p>buildService {<br /> apiDir =
"../microservices-api/src/main/java"<br />
databaseNameMaxLength=100<br /> }</p>Surendra K2018-07-25T07:46:18ZRE: Unable to create entity because column name exceeds 30 charactersWilliam Berkshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1106117452018-07-20T23:29:21Z2018-07-20T23:29:21Z<p>The DTD, <a
href="http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd">http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd</a>,
does not define a 'database-name-max-length' attribute for the
service-builder element. If I try to add it anyway, I still get the
name length error when trying to run the service builder.</p>
<p> </p>
<p>I would love to change the column name, but this is an existing database.</p>William Berks2018-07-20T23:29:21ZRE: Unable to create entity because column name exceeds 30 charactersDavid H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1103442872018-06-26T17:18:02Z2018-06-26T17:18:02Z<p>30 chars sounds like enough, but when you specify the namespace and
use Java-standard naming, SB will create the table as
NAMESPACE_ENTITYNAME and that often will exceed the 30.</p>
<p> </p>David H Nebinger2018-06-26T17:18:02ZRE: Unable to create entity because column name exceeds 30 charactersJorge Diazhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1103171552018-06-22T05:43:11Z2018-06-22T05:43:11Z<p>Oracle database 12.1 and older versions don't support table names
longer than 30 characters, see: https://stackoverflow.com/questions/756558/what-is-the-maximum-length-of-a-table-name-in-oracle#756569</p>Jorge Diaz2018-06-22T05:43:11ZRE: Unable to create entity because column name exceeds 30 charactersDavid H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1102513102018-06-21T15:30:07Z2018-06-21T15:30:07Z<p>In your service.xml file, <service-builder /> is the root
element. Add the "database-name-max-length" attribute on
the root element.</p>
<p> </p>
<p>Me, I never really do this. I tend to use nice clean entity names
per java standards, but I'll also add the db-name and table-name
attributes on the <entity /> and <column /> tags to use
more compressed names following db naming standards.</p>
<p> </p>
<p>Note that the 30 char max was for those DBs where this kind of thing
can be a PITA to identify and resolve, so putting the message in early
was seen as a way to prevent getting all the way down the road only
to encounter it during deployment.</p>David H Nebinger2018-06-21T15:30:07ZUnable to create entity because column name exceeds 30 charactersJohn O'Flahertyhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1102490642018-06-21T14:39:30Z2018-06-21T14:39:30Z<p>Hi all,</p>
<p>I am in the process of migrating 6.2 portlet code over to DXP, many
issues mostly resolved however this one eludes me as yet. In my
service.xml we can have table and column nam