Problem use extend-entity under mysql 5.1.41

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

Problem use extend-entity under mysql 5.1.41

叶双明
Hi all,
I extend an entity after table has been created, like this:
<extend-entity entity-name="ProductPromoCodeParty">
<field name="statusId" type="id"></field>
<field name="useDate" type="date-time"></field>
<relation type="one" fk-name="PROD_PRCDP_PCD_STTS"
rel-entity-name="StatusItem" >
         <key-map field-name="statusId"/>
       </relation>
</extend-entity>
, and add  check-fk-indices-on-start="true" check-fks-on-start="true" to
node datasource in entityengine.xml.

after restart ofbiz, field statusId and useDate is appear in the
table product_promo_code_party, but no PROD_PRCDP_PCD_STTS.
found in error.log:
2013-07-06 14:14:33,796 (OFBiz-config-0) [
DatabaseUtil.java:1439:ERROR] Error getting fk reference meta data Error
was:java.sql.SQLException: Table not specified.. Not checking fk refs.

Is a issue of mysql or ofbiz?

And, When i test it with postgreSQL, everything is ok!
--
叶双明
Reply | Threaded
Open this post in threaded view
|

Re: Problem use extend-entity under mysql 5.1.41

Jacques Le Roux
Administrator
This is more likely an issue with the JDBC driver, try to update it if possible, but no guarantees...
Anyway, if you can, I'd recommend to use Postgres, for few other reasons

Jacques

叶双明 wrote:

> Hi all,
> I extend an entity after table has been created, like this:
> <extend-entity entity-name="ProductPromoCodeParty">
> <field name="statusId" type="id"></field>
> <field name="useDate" type="date-time"></field>
> <relation type="one" fk-name="PROD_PRCDP_PCD_STTS"
> rel-entity-name="StatusItem" >
>          <key-map field-name="statusId"/>
>        </relation>
> </extend-entity>
> , and add  check-fk-indices-on-start="true" check-fks-on-start="true" to
> node datasource in entityengine.xml.
>
> after restart ofbiz, field statusId and useDate is appear in the
> table product_promo_code_party, but no PROD_PRCDP_PCD_STTS.
> found in error.log:
> 2013-07-06 14:14:33,796 (OFBiz-config-0) [
> DatabaseUtil.java:1439:ERROR] Error getting fk reference meta data Error
> was:java.sql.SQLException: Table not specified.. Not checking fk refs.
>
> Is a issue of mysql or ofbiz?
>
> And, When i test it with postgreSQL, everything is ok!
Reply | Threaded
Open this post in threaded view
|

Re: Problem use extend-entity under mysql 5.1.41

叶双明
I use newest mysql jdbc driver, 5.1.25.  I will consider it.

Thanks Jacques.


2013/7/6 Jacques Le Roux <[hidden email]>

> This is more likely an issue with the JDBC driver, try to update it if
> possible, but no guarantees...
> Anyway, if you can, I'd recommend to use Postgres, for few other reasons
>
> Jacques
>
> 叶双明 wrote:
> > Hi all,
> > I extend an entity after table has been created, like this:
> > <extend-entity entity-name="ProductPromoCodeParty">
> > <field name="statusId" type="id"></field>
> > <field name="useDate" type="date-time"></field>
> > <relation type="one" fk-name="PROD_PRCDP_PCD_STTS"
> > rel-entity-name="StatusItem" >
> >          <key-map field-name="statusId"/>
> >        </relation>
> > </extend-entity>
> > , and add  check-fk-indices-on-start="true" check-fks-on-start="true" to
> > node datasource in entityengine.xml.
> >
> > after restart ofbiz, field statusId and useDate is appear in the
> > table product_promo_code_party, but no PROD_PRCDP_PCD_STTS.
> > found in error.log:
> > 2013-07-06 14:14:33,796 (OFBiz-config-0) [
> > DatabaseUtil.java:1439:ERROR] Error getting fk reference meta data Error
> > was:java.sql.SQLException: Table not specified.. Not checking fk refs.
> >
> > Is a issue of mysql or ofbiz?
> >
> > And, When i test it with postgreSQL, everything is ok!
>



--
叶双明
Reply | Threaded
Open this post in threaded view
|

Re: Problem use extend-entity under mysql 5.1.41

Rishi Solanki
I'm not sure but if you rename the fk-name="PROD_PRCDP_PCD_STTS" to
fk-name="PPCP_STTS" i.e less than 18 character then it should work. Came
across the similar problem, Mysql uses one extra character for some
internal usage and that is why you got it worked for postgres.

Hope it helps!


Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Sat, Jul 6, 2013 at 3:19 PM, 叶双明 <[hidden email]> wrote:

> I use newest mysql jdbc driver, 5.1.25.  I will consider it.
>
> Thanks Jacques.
>
>
> 2013/7/6 Jacques Le Roux <[hidden email]>
>
> > This is more likely an issue with the JDBC driver, try to update it if
> > possible, but no guarantees...
> > Anyway, if you can, I'd recommend to use Postgres, for few other reasons
> >
> > Jacques
> >
> > 叶双明 wrote:
> > > Hi all,
> > > I extend an entity after table has been created, like this:
> > > <extend-entity entity-name="ProductPromoCodeParty">
> > > <field name="statusId" type="id"></field>
> > > <field name="useDate" type="date-time"></field>
> > > <relation type="one" fk-name="PROD_PRCDP_PCD_STTS"
> > > rel-entity-name="StatusItem" >
> > >          <key-map field-name="statusId"/>
> > >        </relation>
> > > </extend-entity>
> > > , and add  check-fk-indices-on-start="true" check-fks-on-start="true"
> to
> > > node datasource in entityengine.xml.
> > >
> > > after restart ofbiz, field statusId and useDate is appear in the
> > > table product_promo_code_party, but no PROD_PRCDP_PCD_STTS.
> > > found in error.log:
> > > 2013-07-06 14:14:33,796 (OFBiz-config-0) [
> > > DatabaseUtil.java:1439:ERROR] Error getting fk reference meta data
> Error
> > > was:java.sql.SQLException: Table not specified.. Not checking fk refs.
> > >
> > > Is a issue of mysql or ofbiz?
> > >
> > > And, When i test it with postgreSQL, everything is ok!
> >
>
>
>
> --
> 叶双明
>