Hello Varun, The productId for which you are trying to create a row in Product_Geo , exist in product table also?
Thanks Nandani On Mon, Jul 2, 2012 at 1:52 PM, varun bhansaly <[email protected]> wrote: > Hi Jacopo, > > Thanks for your response, please find the explanation below - > > For product GZ-1001, I would like to setup this configuration - > <ProductGeo productId="GZ-1001" geoId="IND" > productGeoEnumId="PG_PURCH_INCLUDE" /> > <ProductGeo productId="GZ-1001" geoId="IND" > productGeoEnumId="PG_SHIP_INCLUDE" /> > > When I try to create these from Product > Geo, then while trying to setup > the second configuration, the UI crashes, with the following exception - > > Exception thrown while creating the "newEntity" GenericValue: Error while > inserting: [GenericEntity:ProductGeo][createdStamp,2012-07-02 > 09:13:34.138(java.sql.Timestamp)][createdTxStamp,2012-07-02 > > 09:13:34.111(java.sql.Timestamp)][description,null()][geoId,IND(java.lang.String)][lastUpdatedStamp,2012-07-02 > 09:13:34.138(java.sql.Timestamp)][lastUpdatedTxStamp,2012-07-02 > > 09:13:34.111(java.sql.Timestamp)][productGeoEnumId,PG_PURCH_INCLUDE(java.lang.String)][productId,GZ-1001(java.lang.String)] > (SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_GEO > (PRODUCT_ID, GEO_ID, PRODUCT_GEO_ENUM_ID, DESCRIPTION, LAST_UPDATED_STAMP, > LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, > ?, ?, ?, ?) (The statement was aborted because it would have caused a > duplicate key value in a unique or primary key constraint or unique index > identified by 'SQL120702063321810' defined on 'PRODUCT_GEO'.)) > > This prevents me from stating that the product can only be sold to Indian > (billing and shipping) addresses. > > On Mon, Jul 2, 2012 at 12:50 PM, Jacopo Cappellato < > [email protected]> wrote: > > > Hi Varun, > > > > could you please better elaborate (possibly with an example of xml data) > > the issue that you are having? > > > > Jacopo > > > > > > On Jul 2, 2012, at 8:29 AM, varun bhansaly wrote: > > > > > Hi, > > > > > > Anybody having any idea why entity ProductGeo has primary key > > combination - > > > ProductId + GeoId, such primary key combination prevents configuration > > like > > > - Product "Purchase Include Geo" to India and Product "Shipment Include > > > Geo" to India. > > > > > > -- > > > Regards, > > > Varun Bhansaly > > > > > > > -- > Regards, > Varun Bhansaly >
