Posted by
Vinay Agarwal on
Mar 20, 2006; 4:50pm
URL: http://ofbiz.116.s1.nabble.com/Users-PostalAddress-with-Foreign-Country-State-tp137992p137995.html
Jacopo,
I guessed that but isn't it too restrictive that anyone whose state isn't
included in the database won't be able to enter his state id?
Vinay
-----Original Message-----
From:
[hidden email] [mailto:
[hidden email]]
On Behalf Of Jacopo Cappellato
Sent: Monday, March 20, 2006 8:45 AM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - PostalAddress with Foreign Country State
Hi Viany,
you probably just have to add a record in the Geo entity for the UP state.
Jacopo
Vinay Agarwal wrote:
> Hello,
>
>
>
> If I create a postal address, using XML import datasource, with
> STATE_PROVINCE_GEO_ID set to a foreign country state ("UP"), I get the
> following error
>
> ERROR: Error parsing entity xml file:
> org.ofbiz.entity.GenericEntityException: Exception while updating the
> following entity:
>
[GenericEntity:PostalAddress][contactMechId,CompAddrIndia(java.lang.String)]
[lastUpdatedStamp,2006-03-20
> 08:28:35.906(java.sql.Timestamp)][lastUpdatedTxStamp,2006-03-20
> 08:28:35.859(java.sql.Timestamp)][stateProvinceGeoId,UP(java.lang.String)]
> (while updating:
>
[GenericEntity:PostalAddress][contactMechId,CompAddrIndia(java.lang.String)]
[lastUpdatedStamp,2006-03-20
> 08:28:35.906(java.sql.Timestamp)][lastUpdatedTxStamp,2006-03-20
> 08:28:35.859(java.sql.Timestamp)][stateProvinceGeoId,UP(java.lang.String)]
> (SQL Exception while executing the following:UPDATE POSTAL_ADDRESS SET
> STATE_PROVINCE_GEO_ID=?, LAST_UPDATED_TX_STAMP=?, LAST_UPDATED_STAMP=?
> WHERE CONTACT_MECH_ID=? (Cannot add or update a child row: a foreign key
> constraint fails (`ofbiz/postal_address`, CONSTRAINT `POST_ADDR_SPGEO`
> FOREIGN KEY (`STATE_PROVINCE_GEO_ID`) REFERENCES `geo` (`GEO_ID`)))))
>
>
>
> The error definitely relates to "UP" since it works OK if I just change
> it to "CA". Is this an error in xml import or is this the way it is
> supposed to work?
>
>
>
> Thanks in advance,
>
> Vinay Agarwal
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users