Hi Everyone,

I'm having a heck of a time trying to get this to work.  I have a list
of business specific codes I want to apply to a quote.  It's a large
list that changes, so Enumeration wouldn't be right for me here.

For the life of me, I can not figure out why there is no foreign key
constraint created in the Postgres database for the relation on Quote.
I'm using a database that has some quote data in it already, but I did
try deleting all the quote records, extending the entity, and then
adding the records back in via <entity-engine-xml>.

Nothing I've tried results in a FK constraint being created at the
database level.  Any ideas?

<entity entity-name="MyCode"
    package-name="org.ofbiz.common.my"
    title="Classification Code Data Object Entity">
  <field name="code" type="id-ne"></field>
  <field name="description" type="description"></field>
  <field name="fromDate" type="date-time"></field>
  <field name="thruDate" type="date-time"></field>
  <prim-key field="code"/>
</entity>

<extend-entity entity-name="Quote">
  <field name="myCode" type="id-ne" not-null="true"/>
  <relation type="one" fk-name="QUOTE_MY" rel-entity-name="MyCode">
    <key-map field-name="myCode" rel-field-name="code"/>
  </relation>
</extend-entity>

-Forrest

Reply via email to