You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Justin Robinson <of...@fluidnotions.com> on 2015/01/14 13:53:04 UTC

OFBiz 10.04 -> Entity XML Tools -> alternative to EntityDataLoader.loadData with dummyFks=true

I have a client using a customized version of OFBiz 10.04.
I gather from tracing org.ofbiz.entity.util.EntityDataLoader.loadData
through to org.ofbiz.entity.GenericValue.checkFks(boolean) that if a
foreign key is missing during a xml import a dummy value is created.
(checkFks javadoc comment "Checks to see if all foreign key records exist
in the database. Will create a dummy value for those missing when
specified.")

The requirement is to Instead of creating dummy values if FKs are missing
they want to load the XML files in the correct sequence to avoid the
foreign key relationships or other contraint issues.

Has this type of problem already been solved in later versions of ofbiz?

Are then any tools available in later versions of ofbiz that can report on
backup/restore failures due to violated constraints?

I've heard some say ofbiz is quirky, can the developers on the list give me
some guidance on where the best place to implement such functionality would
be?

Re: OFBiz 10.04 -> Entity XML Tools -> alternative to EntityDataLoader.loadData with dummyFks=true

Posted by Pierre Smits <pi...@gmail.com>.
Hi Justin,

Welcome to this community.

The best place for extensions of a temporary nature is the hot-deploy
folder. If you want to have it permanent in place and use, you could
consider moving it to the special-purpose folder at your moment of
convenience.

Best regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com

On Wed, Jan 14, 2015 at 1:53 PM, Justin Robinson <ofbiz-dev@fluidnotions.com
> wrote:

> I have a client using a customized version of OFBiz 10.04.
> I gather from tracing org.ofbiz.entity.util.EntityDataLoader.loadData
> through to org.ofbiz.entity.GenericValue.checkFks(boolean) that if a
> foreign key is missing during a xml import a dummy value is created.
> (checkFks javadoc comment "Checks to see if all foreign key records exist
> in the database. Will create a dummy value for those missing when
> specified.")
>
> The requirement is to Instead of creating dummy values if FKs are missing
> they want to load the XML files in the correct sequence to avoid the
> foreign key relationships or other contraint issues.
>
> Has this type of problem already been solved in later versions of ofbiz?
>
> Are then any tools available in later versions of ofbiz that can report on
> backup/restore failures due to violated constraints?
>
> I've heard some say ofbiz is quirky, can the developers on the list give me
> some guidance on where the best place to implement such functionality would
> be?
>

Re: OFBiz 10.04 -> Entity XML Tools -> alternative to EntityDataLoader.loadData with dummyFks=true

Posted by Gavin Mabie <kw...@gmail.com>.
Check
https://cwiki.apache.org/confluence/display/OFBIZ/Handling+of+External+data

The  EntityImportDir functionality located at
https://localhost:8443/webtools/control/EntityImportDir might be of some
help.  It imports *Data.xml files and will iterate over a number of passes
until it finds the FK.

Gavin

On Wed, Jan 14, 2015 at 2:53 PM, Justin Robinson <ofbiz-dev@fluidnotions.com
> wrote:

> I have a client using a customized version of OFBiz 10.04.
> I gather from tracing org.ofbiz.entity.util.EntityDataLoader.loadData
> through to org.ofbiz.entity.GenericValue.checkFks(boolean) that if a
> foreign key is missing during a xml import a dummy value is created.
> (checkFks javadoc comment "Checks to see if all foreign key records exist
> in the database. Will create a dummy value for those missing when
> specified.")
>
> The requirement is to Instead of creating dummy values if FKs are missing
> they want to load the XML files in the correct sequence to avoid the
> foreign key relationships or other contraint issues.
>
> Has this type of problem already been solved in later versions of ofbiz?
>
> Are then any tools available in later versions of ofbiz that can report on
> backup/restore failures due to violated constraints?
>
> I've heard some say ofbiz is quirky, can the developers on the list give me
> some guidance on where the best place to implement such functionality would
> be?
>