<?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>AssetEntry for a Service Builder entity with two primary keys</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117529862" />
  <subtitle>AssetEntry for a Service Builder entity with two primary keys</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117529862</id>
  <updated>2026-04-03T20:30:17Z</updated>
  <dc:date>2026-04-03T20:30:17Z</dc:date>
  <entry>
    <title>RE: AssetEntry for a Service Builder entity with two primary keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117530719" />
    <author>
      <name>Mirko Romstadt</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117530719</id>
    <updated>2019-10-22T12:25:16Z</updated>
    <published>2019-10-22T12:25:16Z</published>
    <summary type="html">&lt;blockquote&gt;AssetEntry PKs (or was it FKs in this case?) need to match your Entity&amp;#39;s PK&lt;/blockquote&gt;&lt;br /&gt;I had a look at the AssetEntry table, the AssetEntry PK is the &lt;em&gt;entryId&lt;/em&gt; which never matches the entity&amp;#39;s PK (which is stored in the &lt;em&gt;classPK &lt;/em&gt;column). But anyway, if I got you right, I need to add a (long) primary key to my entity to make it work with AssetEntries.&lt;br /&gt;Thanks!&lt;br /&gt;​​​​​​​Mirko</summary>
    <dc:creator>Mirko Romstadt</dc:creator>
    <dc:date>2019-10-22T12:25:16Z</dc:date>
  </entry>
  <entry>
    <title>RE: AssetEntry for a Service Builder entity with two primary keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117531627" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117531627</id>
    <updated>2019-10-22T12:13:57Z</updated>
    <published>2019-10-22T12:13:57Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Mirko Romstadt:&lt;/div&gt;&lt;blockquote&gt;&lt;br /&gt;Is there any method I missed or do I have to convert my entity to have a single primary key of type &lt;em&gt;long&lt;/em&gt;?&lt;br /&gt;&lt;/blockquote&gt;AFAIK that&amp;#39;s it. AssetEntry PKs (or was it FKs in this case?) need to match your Entity&amp;#39;s PK</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2019-10-22T12:13:57Z</dc:date>
  </entry>
  <entry>
    <title>AssetEntry for a Service Builder entity with two primary keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117529861" />
    <author>
      <name>Mirko Romstadt</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117529861</id>
    <updated>2019-10-22T10:24:43Z</updated>
    <published>2019-10-22T10:24:43Z</published>
    <summary type="html">Hi,&lt;br /&gt;Is it possible to create an AssetEntry for a Service Builder entity that has two primary keys? The Liferay tutorial (&lt;a href="https://help.liferay.com/hc/en-us/articles/360034857611-Handling-Assets-for-the-GuestbookEntry-Service"&gt;https://help.liferay.com/hc/en-us/articles/360034857611-Handling-Assets-for-the-GuestbookEntry-Service&lt;/a&gt;) gives an example for the GuestbookEntry entity that has the &lt;strong&gt;&lt;em&gt;entryId &lt;/em&gt;&lt;/strong&gt;of type &lt;em&gt;long &lt;/em&gt;as a primary key. I would like to do this with a Service Builder entity that has two fields as primary key and thus has a &lt;em&gt;&lt;strong&gt;nameOfTheEntityPK &lt;/strong&gt;&lt;/em&gt;of type &lt;em&gt;NameOfTheEntityPK&lt;/em&gt;. This does not work with the AssetEntry methods as it expects &lt;em&gt;long&lt;/em&gt;.&lt;br /&gt;Is there any method I missed or do I have to convert my entity to have a single primary key of type &lt;em&gt;long&lt;/em&gt;?&lt;br /&gt;Thanks,&lt;br /&gt;​​​​​​​Mirko</summary>
    <dc:creator>Mirko Romstadt</dc:creator>
    <dc:date>2019-10-22T10:24:43Z</dc:date>
  </entry>
</feed>
