Why New fields data is not saved in the database.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why New fields data is not saved in the database.

gopalbi
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

 
Reply | Threaded
Open this post in threaded view
|

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

Sumit Pandit-3
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.
>

Reply | Threaded
Open this post in threaded view
|

New fields data is not saved in the database.

gopalbi
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.
>