<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Service Builder - UUID as Primary Key?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=33961685" />
  <subtitle>Service Builder - UUID as Primary Key?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=33961685</id>
  <updated>2026-06-15T20:27:33Z</updated>
  <dc:date>2026-06-15T20:27:33Z</dc:date>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=35197064" />
    <author>
      <name>Zsigmond Rab</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=35197064</id>
    <updated>2014-03-03T20:31:35Z</updated>
    <published>2014-03-03T20:31:35Z</published>
    <summary type="html">Hi Giuseppe,&lt;br /&gt;&lt;br /&gt;in case of DLFileEntry table, the fileEntryId is the primary key and the groupId and the uuid_ constitute a unique key on the table.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Zsigmond</summary>
    <dc:creator>Zsigmond Rab</dc:creator>
    <dc:date>2014-03-03T20:31:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=35169313" />
    <author>
      <name>Giuseppe Pantaleo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=35169313</id>
    <updated>2014-03-03T16:34:05Z</updated>
    <published>2014-03-03T16:34:05Z</published>
    <summary type="html">Hi all,&lt;br /&gt;&lt;br /&gt;may I use table id as PK instead of uuid?&lt;br /&gt;&lt;br /&gt;I mean in &amp;#39;dlfileentry&amp;#39; table, i.e., which is the primary key? fileEntryId? uuid_? Or the couple uuid_ &amp;amp; groupId?</summary>
    <dc:creator>Giuseppe Pantaleo</dc:creator>
    <dc:date>2014-03-03T16:34:05Z</dc:date>
  </entry>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34800804" />
    <author>
      <name>Zsigmond Rab</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34800804</id>
    <updated>2014-02-22T14:54:19Z</updated>
    <published>2014-02-22T14:54:19Z</published>
    <summary type="html">Hi Jeremy,&lt;br /&gt;&lt;br /&gt;as I can see your needs, unfortunately, you cannot use the Liferay&amp;#39;s uuid mechanism. It&amp;#39;s working in a  bit different way.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Zsigmond</summary>
    <dc:creator>Zsigmond Rab</dc:creator>
    <dc:date>2014-02-22T14:54:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34538898" />
    <author>
      <name>Jeremy Place</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34538898</id>
    <updated>2014-02-17T16:58:56Z</updated>
    <published>2014-02-17T16:58:56Z</published>
    <summary type="html">Hi Zsigmond&lt;br /&gt;&lt;br /&gt;I use UUIDs as IDs for entities (interfacing with flat XML/Document X.500/object stores). I can use utilities to create my own UUID as the PK for Service Builder entities, but it seemed a waste as Service Builder provides the UUID interface.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;&lt;br /&gt;Jeremy</summary>
    <dc:creator>Jeremy Place</dc:creator>
    <dc:date>2014-02-17T16:58:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34487836" />
    <author>
      <name>Zsigmond Rab</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34487836</id>
    <updated>2014-02-16T14:49:29Z</updated>
    <published>2014-02-16T14:49:29Z</published>
    <summary type="html">Hi Jeremy,&lt;br /&gt;&lt;br /&gt;beside what David wrote, a uuid, how the Liferay is using that for assets or pages for example, is not a real primary key on system level, because the groupId is needed also to have a unique key for one object. With other words, a uuid is unique only within one group.&lt;br /&gt;&lt;br /&gt;The question is, for what would you like to your uuid? What is the meaning of your uuid?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Zsigmond</summary>
    <dc:creator>Zsigmond Rab</dc:creator>
    <dc:date>2014-02-16T14:49:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34380184" />
    <author>
      <name>Jeremy Place</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34380184</id>
    <updated>2014-02-13T18:44:36Z</updated>
    <published>2014-02-13T18:44:36Z</published>
    <summary type="html">When you say &amp;#34;you don&amp;#39;t&amp;#34; is that because it is a limitation of Liferay (ie &amp;#34;you can&amp;#39;t&amp;#34;)? My data model uses UUIDs as Primary Keys and I would like to implement it using Service Builder.</summary>
    <dc:creator>Jeremy Place</dc:creator>
    <dc:date>2014-02-13T18:44:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34048353" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=34048353</id>
    <updated>2014-02-10T13:26:26Z</updated>
    <published>2014-02-10T13:26:26Z</published>
    <summary type="html">um, you don&amp;#39;t.  UUIDs are supposed to be surrogate keys that you can give to the outside world to represent a unique record, but they should not be your primary keys.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2014-02-10T13:26:26Z</dc:date>
  </entry>
  <entry>
    <title>Service Builder - UUID as Primary Key?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=33961684" />
    <author>
      <name>Jeremy Place</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=33961684</id>
    <updated>2014-02-09T10:08:10Z</updated>
    <published>2014-02-09T10:08:10Z</published>
    <summary type="html">Hi&lt;br /&gt;&lt;br /&gt;How do you configure Service Builder to build the auto-generated UUID as the PK for the table?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;&lt;br /&gt;Jez</summary>
    <dc:creator>Jeremy Place</dc:creator>
    <dc:date>2014-02-09T10:08:10Z</dc:date>
  </entry>
</feed>
