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 |
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 |
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 < [hidden email]> 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 |
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 <[hidden email]> 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 < > [hidden email]> 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 > |
In reply to this post by Varun Bhansaly
Yes, I see what I mean and without looking at the data model I suspect that you are right and that the productGeoEnumId should be part of the primary key; the primary key should actually also contain a fromDate field.
Regards, Jacopo On Jul 2, 2012, at 10:22 AM, varun bhansaly 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 < > [hidden email]> 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 |
Hi Jacopo,
I can work on a patch for this once we can freeze the - 1. Entity 2. UI - meaning should productGeoEnumId remain editable ? 3. Upgrade path for existing systems. On Jul 2, 2012 3:56 PM, "Jacopo Cappellato" < [hidden email]> wrote: > > Yes, I see what I mean and without looking at the data model I suspect that you are right and that the productGeoEnumId should be part of the primary key; the primary key should actually also contain a fromDate field. > > Regards, > > Jacopo > > > On Jul 2, 2012, at 10:22 AM, varun bhansaly 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 > > 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 < > > [hidden email]> 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 > >>> Geo" to India. > >>> > >>> -- > >>> Regards, > >>> Varun Bhansaly > >> > >> > > > > > > -- > > Regards, > > Varun Bhansaly > |
Free forum by Nabble | Edit this page |