You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Patrick <pa...@gmail.com> on 2010/06/23 01:02:32 UTC
create ProductCategory fails
When I create a ProductCategory in java, the categoryName doesn't get
stored. Any possible idea why? It gives no errors and throws no
exceptions. The row is populated with all the data but the
categoryName. I can modify categoryName from the admin panel, and I
even tried to call that service, updateProductCategory, from java, but
the same problem occured.
GenericValue newSubCategory = delegator.makeValue("ProductCategory");
newSubCategory.set("productCategoryId", subCatId); //works
newSubCategory.set("categoryName", "testName"); //doesn't work
newSubCategory.set("productCategoryTypeId", "CATALOG_CATEGORY");
try {
newSubCategory.create();
} catch (GenericEntityException e) {
Thanks in advance.
Re: create ProductCategory fails
Posted by Bilgin Ibryam <bi...@gmail.com>.
Tried your code in a groovy file and it worked.
Bilgin
On Wed, Jun 23, 2010 at 12:02 AM, Patrick <pa...@gmail.com>wrote:
> When I create a ProductCategory in java, the categoryName doesn't get
> stored. Any possible idea why? It gives no errors and throws no
> exceptions. The row is populated with all the data but the
> categoryName. I can modify categoryName from the admin panel, and I
> even tried to call that service, updateProductCategory, from java, but
> the same problem occured.
>
> GenericValue newSubCategory = delegator.makeValue("ProductCategory");
> newSubCategory.set("productCategoryId", subCatId); //works
> newSubCategory.set("categoryName", "testName"); //doesn't work
> newSubCategory.set("productCategoryTypeId", "CATALOG_CATEGORY");
> try {
> newSubCategory.create();
> } catch (GenericEntityException e) {
>
> Thanks in advance.
>