Hello Ashish,

     Actually i have to add a new entity under product package that will
create a new table in ofbiz.Few field in this table totally a new one.While
saving the data in this table only those field are save while are present in
product table.like productId and description and other field are not save
like size, color. But if we put a copy of these field in the product table
then it will be save.

Example(Condition 1)
Entity 1

<extend-entity entity-name="Product"> 
        <field name="productId" type="id-ne"></field> 
        <field name="description" type="description"></field> 
    </extend-entity> 
Entity 2

<extend-entity entity-name="Xyz"> 
        <field name="productId" type="id-ne"></field> 
        <field name="description" type="description"></field>
        <field name="coloring" type="long-varchar"></field> 
 

    </extend-entity> 
// The color field data is not saving in Xyz table only those field are save
while are present in product table


Condition 2
Entity 1

<extend-entity entity-name="Product"> 
        <field name="productId" type="id-ne"></field> 
        <field name="description" type="description"></field> 
        <field name="coloring" type="long-varchar"></field> 
    </extend-entity> 
Entity 2

<extend-entity entity-name="Xyz"> 
        <field name="productId" type="id-ne"></field> 
        <field name="description" type="description"></field>
        <field name="coloring" type="long-varchar"></field> 
 

    </extend-entity> 
// But if we put a copy of these coloring field in the product table then it
will be save.

But please give me a proper solution.

Thanks & Regards:
 Gopal 

Ashish Vijaywargiya-4 wrote:
> 
> Hello Gopal,
> 
>>> I have to add a new entity in ofbiz under product package.
> I guess you are asking to add new fields in the Product table instead of
> new
> entity in the Product package (org.ofbiz.product.*)  :-).
> 
> Color,Size can be treated as the Feature of any product.
> ProductFeature is the table that can help you to put those values.
> 
> If you would like to add the fields to existing entities then
> <extend-entity> can be used for this purpose.
> For ex :-
>     <extend-entity entity-name="Product">
>         <field name="customComments" type="comment"></field>
>         <field name="customAmount" type="currency-amount"></field>
>     </extend-entity>
> 
> Please let us know if  you need more help on this.
> 
> --
> Ashish
> 
> On Fri, Jul 25, 2008 at 3:22 AM, AnandM <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hello Friends i need your great help
>>
>>                I have to add a new entity in ofbiz under product package.
>> While calling new entity method this entity is saving only those field
>> which
>> are in product table(entitymodel.xml).Then how i add new field in the new
>> entity like color, size.
>>
>> Thanks & regards:
>> Gopal Bisht
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-add-new-field-in-the-new-entity--tp18641313p18641313.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Ashish Vijaywargiya
> Indore (M.P), India
> http://en.wikipedia.org/wiki/Indore
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-add-new-field-in-the-new-entity--tp18641313p18688844.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to