Note that there are some explanatory texts on larger screens.

plurals
  1. POsingle-table-per-hierarchy mapping error
    primarykey
    data
    text
    <p>I got the following mappings</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="false"&gt; &lt;subclass name="Module.CRM.Models.CallRecord, Module.CRM" extends="Gate.Calls.CallRecord, Gate.SDK" discriminator-value="call_record_id"&gt; &lt;property name="ContactId" column="contact_id" /&gt; &lt;property name="CompanyId" column="company_id" /&gt; &lt;/subclass&gt; &lt;/hibernate-mapping&gt; </code></pre> <p>And:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="false"&gt; &lt;class name="Gate.Calls.CallRecord, Gate.SDK" table="call_records" lazy="true"&gt; &lt;id name="Id" column="id"&gt; &lt;generator class="sequence"&gt; &lt;param name="sequence"&gt;call_records_id_seq&lt;/param&gt; &lt;/generator&gt; &lt;/id&gt; &lt;property name="UserId" column="user_id" type="integer" /&gt; &lt;property name="SiteId" column="site_id" type="integer" /&gt; &lt;property name="PhoneNumber" column="phone_number" type="string" /&gt; &lt;property name="CreatedAt" column="created_at" type="datetime" /&gt; &lt;property name="Duration" column="duration" type="integer" /&gt; &lt;property name="IsInbound" column="is_inbound" type="boolean" /&gt; &lt;property name="HangupCause" column="hangup_cause" type="integer" /&gt; &lt;property name="RingDuration" column="ring_duration" type="integer" /&gt; &lt;/class&gt; &lt;/hibernate-mapping&gt; </code></pre> <p>I get the following error</p> <blockquote> <p>No discriminator found for Module.CRM.Models.CallRecord.</p> </blockquote> <p>Haven't I specified a discriminator?</p> <p><strong>Edit</strong></p> <p>Done some more research: Discriminator is not what I should use. call_record_id in crm_call_records points on id in call_records. What should the mapping files look like?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload