I have an action-only ruleset to seed some data for later rulesets. I have a Product entity which has an N:1 association to a ProductGroup entity.
To add Product records, I have lines similar to this:
Product.new[productId='P1', name='Lettuce']
Product.new[productId='P2', name='Filet Mignon']
Product.new[productId='P3', name='Apple']
To add ProductGroup records, I have:
ProductGroup.new[productGroupId='PG1', 'Produce']
ProductGroup.new[productGroupId='PG2', 'Meat']
So what is the syntax to associate the "Lettuce" product to the "Produce" product group?
I have an action-only ruleset to seed some data for later rulesets. I have a Product entity which has an N:1 association to a ProductGroup entity.
To add Product records, I have lines similar to this:
Product.new[productId='P1', name='Lettuce']
Product.new[productId='P2', name='Filet Mignon']
Product.new[productId='P3', name='Apple']
To add ProductGroup records, I have:
ProductGroup.new[productGroupId='PG1', 'Produce']
ProductGroup.new[productGroupId='PG2', 'Meat']
So what is the syntax to associate the "Lettuce" product to the "Produce" product group?
Flag this post as spam/abuse.
I have an action-only ruleset to seed some data for later rulesets. I have a Product entity which has an N:1 association to a ProductGroup entity.
To add Product records, I have lines similar to this:
Product.new[productId='P1', name='Lettuce']
Product.new[productId='P2', name='Filet Mignon']
Product.new[productId='P3', name='Apple']
To add ProductGroup records, I have:
ProductGroup.new[productGroupId='PG1', 'Produce']
ProductGroup.new[productGroupId='PG2', 'Meat']
So what is the syntax to associate the "Lettuce" product to the "Produce" product group?
Flag this post as spam/abuse.
Flag this post as spam/abuse.
I have an action-only ruleset to seed some data for later rulesets. I have a Product entity which has an N:1 association to a ProductGroup entity.
To add Product records, I have lines similar to this:
Product.new[productId='P1', name='Lettuce']
Product.new[productId='P2', name='Filet Mignon']
Product.new[productId='P3', name='Apple']
To add ProductGroup records, I have:
ProductGroup.new[productGroupId='PG1', 'Produce']
ProductGroup.new[productGroupId='PG2', 'Meat']
So what is the syntax to associate the "Lettuce" product to the "Produce" product group?
Flag this post as spam/abuse.
Flag this post as spam/abuse.
Flag this post as spam/abuse.
Thanks. This helps very much.
You can also use the -= notation to remove an entity from an existing collection.
You can also use += and -= in combination to move items in and out of collections.
See this example community.progress.com/.../1377.aspx