Seed data files are used to load the OFBiz database—sometimes referred to as "seeding" the database—with data whenever the ANT database data loading targets are called. You may create new seed data files as needed. Each Component may have one or more seed data files, and OFBiz supports an unlimited number of seed data files across the installation.
Navigate to the top-level directory for the component that will contain the new seed data file.
Follow this recipe to create new seed data files:
1. Open the
ofbiz-component.xml
file in an editor of your choice.2. Add an
entity-resource
XML declaration with the seed data file's location as shown here. Thelocation
attribute contains the location of the file relative to the containing Component. Thereader-name
attribute tells OFBiz when to load the file based on ANT targets.<entity-resource type="data" reader-name="seed" loader="main" location="data/mainSeedData.xml"/> <!-- For data...