Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums Forums OroCommerce Question about Importing entities in ORO applications

This topic contains 1 reply, has 2 voices, and was last updated by  vshutko 4 months ago.

  • Creator
  • #32301


    Assumme one would write an importing functionality just like the way the demo data is being imported.What would be the problem using this approach instead of using the platform approach i.e importexport.yml ?

    E.g Oro\Bundle\ProductBundle\Migrations\Data\Demo\ORM::load

    -> File being read
    -> Class object initialized and data filled in
    -> Flushing the entity

    I am asking this to clear things up as both approach have been used.

Viewing 1 replies (of 1 total)
  • Author
  • #32302


    Demo data migrations are used to load data needed to demonstrate application features, they are not usable for import/export. But if you want use it for import the main problem is once migration is loaded it is marked as “executed” (see ‘oro_migrations_data’ table) and you can’t execute it once more. So use migrations only if you need to load main data (example of main data – list of countries) or demo data.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.