As a follow up to this question, what is the best approach for calling 'addBindVariableDictionary()' when you have two entities in your query?
Not sure if this is the best way to to do it, but I was able to get this to work by adding a second entity.
EOEntity e1 = EOUtilities.entityForClass(ctx, Entity1.class); EOEntity e2 = EOUtilities.entityForClass(ctx, Entity2.class); .. EOSQLExpression exp = factory.createExpression(e1) <-- Here I just chose one entity to create the _expression_ and it seemed to work .. exp.addBindVariableDictionary(exp.bindVariableDictionaryForAttribute(e1.attributeNamed(e1.E1_ID_KEY), value); exp.addBindVariableDictionary(exp.bindVariableDictionaryForAttribute(e2.attributeNamed(e2.E2_ID_KEY), value);
Thoughts? Confusion? Chaos?
Thanks,
Chris Pastore
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|