Use Person table for record creation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Use Person table for record creation

dhiraj.g

Use Person table for record creation .

INSERT on table 'PERSON' caused a violation of foreign key constraint 'PERSON_PARTY' for key (10050). The statement has been rolled back.
Dhiraj Gupta
Reply | Threaded
Open this post in threaded view
|

Re: Use Person table for record creation

Camilo Oviedo
Hi , I have the same problem now .You can resolve it  ??
Reply | Threaded
Open this post in threaded view
|

Re: Use Person table for record creation

Camilo Oviedo
This post was updated on .
I understand the error.Is because you have a pk "party_id" in the table "party" and the same like fk in the table "person" .And I create only the fk with this code .

<service name="createPracticePerson" default-entity-name="Person" engine="entity-auto"
          location="component://practice/script/org/practice/practice/PracticeServices.xml" invoke="create" auth="true">
     <description>Create a Person</description>
     
     <auto-attributes include="pk" mode="OUT" optional="false"/>
   
     <attribute name="salutation" mode="IN" type="String" optional="true"/>
     <attribute name="firstName" mode="IN" type="String" optional="false"/>
     <attribute name="middleName" mode="IN" type="String" optional="true"/>
     <attribute name="lastName" mode="IN" type="String" optional="false"/>
     <attribute name="suffix" mode="IN" type="String" optional="true"/>
</service> 

How I could create the person with the pk of table "party" equal to fk in the table "person" ?