26 February 2011 at 10:12am
I'm just wondering how you define has_many relations using the BulkLoader.
I have a csv that contains UPC's, descriptions, etc for clothing items. I've set up one DataObject with all the common info for a product such as Name, Color etc. and a has_many relation to another DataObject that contains the UPC and Size. How do I ensure that has_many relations link correctly out of one csv.
Or Am I better off just importing into one table and trying to filter out duplicate style numbers in other interfaces in my app?
18 March 2011 at 8:58am
Yeah I ended up just flipping the way I was thinking about it. I uploaded the CSV to a UPC bulkloader which would than create the individual items. I think My problem was I was thinking it heretically instead of as a two way relation. Because if each item has_many UPCs then each UPC has_one Item. Just means using a lot of dot notion to build the Item.
18 March 2011 at 9:28am
Thanks for the update. This is good to know.
I was able to resolve my problem via directly populating the database ( its data from another SS database). The issue I had I resolved as follows http://silverstripe.org/data-model-questions/show/16221#post300697