Jacopo
On Jul 17, 2008, at 2:28 PM, Amine Benkirane wrote:
Hi,I'm customizing, acutally, an OFBiz ecommerce site. For my specific needs, I want to associates Categories and products with parties. Basically, I add a party like customerA (partyId = 10000) and I want that this customer can only visualize (and buy) the categories and products which are associated to him.I saw that in the Catalog Manager Application when I browsed my categories and click on one, there is a parties menu. I thought that can do my need but when I want to associate party to category (I select customer for the type), I had this error :The Following Errors Occurred: ERROR: Could not complete the Add Party to Category[file:/C:/Projets_Eclipse/ofbiz-mars/applications/product/script/org/ ofbiz/product/category/CategoryServices.xml#addPartyToCategory]process [problem creating the newEntity value: Error while inserting: [GenericEntity:ProductCategoryRole][createdStamp,2008-07-17 14:25:46.005(java.sql.Timestamp)][createdTxStamp,2008-07-17 14:25:44.453(java.sql.Timestamp)][fromDate,2008-07-17 14:25:46.005(java.sql.Timestamp)][lastUpdatedStamp,2008-07-17 14:25:46.005(java.sql.Timestamp)][lastUpdatedTxStamp,2008-07-1714:25:44.453(java.sql.Timestamp)][partyId,10000(java.lang.String)] [productCategoryId,snackfood_fr(java.lang.String)] [roleTypeId,CUSTOMER(java.lang.String)](SQL Exception while executing the following:INSERT INTO OFBIZ.PRODUCT_CATEGORY_ROLE (PRODUCT_CATEGORY_ID, PARTY_ID, ROLE_TYPE_ID, FROM_DATE, THRU_DATE, COMMENTS, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?,?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'PRODUCT_CATEGORY_ROLE' causeda violation of foreign key constraint 'PROD_CRLE_PTYRLE' for key (10000,CUSTOMER). The statement has been rolled back.))]Did I forgot something to do this association betwwen my categories and parties ?Regards, Amine _________________________________________________________________Votre correspondant a choisi Hotmail, un e-mail ultra sécurisé. Créez le votre gratuitement !http://www.windowslive.fr/hotmail/default.asp
smime.p7s
Description: S/MIME cryptographic signature
