You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by gopalbi <go...@hytechpro.com> on 2008/08/12 09:09:15 UTC

Why New fields data is not saved in the database.

Hello friends i need your great help,

     i have added one new page under the catalog tab in the place of
shipping. I have add a new form  in the productform.xml in which some field
like.
product_id
color
disposition

And i have create i new entity in th entitymodel.xml therefore a new table
is created in the database.
But the problem is if we go to page and enter the value in the form like

product_id -1111
color-Green
disposition-Jimjam

Then only product_id field is saved in the table other field are going null.


Condition:2
But if we put color and disposition in the product entity in the
entitymodel.xml. Then it save the data in the database.

Please give me the correct direction.Where i am wrong.

Thanks in advance
Thanks & Regards:
Gopal Bisht

 

-- 
View this message in context: http://www.nabble.com/Why-New-fields-data-is-not-saved-in-the-database.-tp18939112p18939112.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


New fields data is not saved in the database.

Posted by gopalbi <go...@hytechpro.com>.
Yes sumit it is same.
Condition 1:
if i will do this then only product_id and description is save in the
HtpGenerateEan table.Beacuse it is avaible in the product table.But the
other field are not avaible in the product table.Therefore is not save.
Condition 2:
If we put same field in the Product entity then it is save.like this
<field name="color" type="long-varchar"></field>
<field name="disposition" type="long-varchar"></field>
------------------------------***************----------------------------------------
<entity entity-name="HtpGenerateEan"
            package-name="org.ofbiz.product.product"
            title="Generate EAN Entity">
      <field name="productId" type="id-ne"></field>
      <field name="description" type="description"></field>
      <field name="color" type="long-varchar"></field>
      <field name="disposition" type="long-varchar"></field>
     
      <field name="createdDate" type="date-time"></field>
     <field name="createdByUserLogin" type="id-vlong"></field>
      <field name="lastModifiedDate" type="date-time"></field>
      <field name="lastModifiedByUserLogin" type="id-vlong"></field>
      <prim-key field="productId"/>
    </entity>
------------------------------***************----------------------------------------

So please give me the correct direction.

Regards:
Gopal 

Sumit Pandit-3 wrote:
> 
> Hello Gopal,
> 
> Please check your code, are the variable name used in form and used in  
> event is same?
> 
> --
> Thanks and Regards
> Sumit Pandit.
> HotWaxMedia, Inc
> http://www.hotwaxmedia.com
> 
> On Aug 12, 2008, at 12:39 PM, gopalbi wrote:
> 
>>
>> Hello friends i need your great help,
>>
>>     i have added one new page under the catalog tab in the place of
>> shipping. I have add a new form  in the productform.xml in which  
>> some field
>> like.
>> product_id
>> color
>> disposition
>>
>> And i have create i new entity in th entitymodel.xml therefore a new  
>> table
>> is created in the database.
>> But the problem is if we go to page and enter the value in the form  
>> like
>>
>> product_id -1111
>> color-Green
>> disposition-Jimjam
>>
>> Then only product_id field is saved in the table other field are  
>> going null.
>>
>>
>> Condition:2
>> But if we put color and disposition in the product entity in the
>> entitymodel.xml. Then it save the data in the database.
>>
>> Please give me the correct direction.Where i am wrong.
>>
>> Thanks in advance
>> Thanks & Regards:
>> Gopal Bisht
>>
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Why-New-fields-data-is-not-saved-in-the-database.-tp18939112p18939112.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-New-fields-data-is-not-saved-in-the-database.-tp18939112p18940470.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Why New fields data is not saved in the database.

Posted by Sumit Pandit <su...@hotwaxmedia.com>.
Hello Gopal,

Please check your code, are the variable name used in form and used in  
event is same?

--
Thanks and Regards
Sumit Pandit.
HotWaxMedia, Inc
http://www.hotwaxmedia.com

On Aug 12, 2008, at 12:39 PM, gopalbi wrote:

>
> Hello friends i need your great help,
>
>     i have added one new page under the catalog tab in the place of
> shipping. I have add a new form  in the productform.xml in which  
> some field
> like.
> product_id
> color
> disposition
>
> And i have create i new entity in th entitymodel.xml therefore a new  
> table
> is created in the database.
> But the problem is if we go to page and enter the value in the form  
> like
>
> product_id -1111
> color-Green
> disposition-Jimjam
>
> Then only product_id field is saved in the table other field are  
> going null.
>
>
> Condition:2
> But if we put color and disposition in the product entity in the
> entitymodel.xml. Then it save the data in the database.
>
> Please give me the correct direction.Where i am wrong.
>
> Thanks in advance
> Thanks & Regards:
> Gopal Bisht
>
>
>
> -- 
> View this message in context: http://www.nabble.com/Why-New-fields-data-is-not-saved-in-the-database.-tp18939112p18939112.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>