Login  Register

Re: Error when new creating party note in SVN 530623

Posted by Ashish Vijaywargiya-3 on Apr 20, 2007; 11:16am
URL: http://ofbiz.116.s1.nabble.com/Error-when-new-creating-party-note-in-SVN-530623-tp145826p145827.html

Hi Jason,

This is foreign key constraint error.(NoteID1 that you are providing for
note_id doesn't exists in the NoteData entity.)
You should provide the value in either one of the field.
Value in First field is given if you would like to provide the same note
that you have already created to someone else.
Probably , In future there should be a note lookup adjacent to the text
field so that it would be easy for someone to select the previously created
note. I will create issue + patch for this ASAP :-)

Please try to put some value inside the "Note" field .Then see the NoteData
entity for the generated note_id.
And then put this value in the first field i.e Note_Id and see how does it
goes.

Let us know if you find it difficult to figure out.

On 4/20/07, Jason Wu <[hidden email]> wrote:

>
> Hi,
>
> In the demo env, when I want to create a note for party from Party Profile
> page, an error occurred. Sould I config something before?
>
> My SVN is 530623 and database is postgresql.
>
> The Following Errors Occurred:
>
> Problem associating note with party "Exception while inserting the
> following
> entity: [GenericEntity:PartyNote][createdStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][createdTxStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][lastUpdatedStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][lastUpdatedTxStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][noteId,NoteID1(java.lang.String)][partyId,approver(
> java.lang.String)] (while inserting:
> [GenericEntity:PartyNote][createdStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][createdTxStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][lastUpdatedStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][lastUpdatedTxStamp,2007-04-20 11:46:59.343(
> java.sql.Timestamp)][noteId,NoteID1(java.lang.String)][partyId,approver(
> java.lang.String)] (SQL Exception while executing the following:INSERT
> INTO
> public.PARTY_NOTE (PARTY_ID, NOTE_ID, LAST_UPDATED_STAMP,
> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?,
> ?,
> ?, ?) (ERROR: insert or update on table "party_note" violates foreign key
> constraint "party_note_note"
> Detail: Key (note_id)=(NoteID1) is not present in table "note_data".)))".
>
> Thanks
>
> Jason
>



--
Thanks & Regards
Ashish Vijaywargiya
Aditisoft Technology Laboratory
http://www.adititechlabs.com
[hidden email]
__________________________________
Office          :  509.855.4113
Cellphone    :  +919893479711