Hi - I wonder if anyone can clarify the difference between the IRelationPredicateBucket and RelationPredicateBucket objects? I was assuming that IRelationPredicateBucket was an interface class and so not meant to be directly instantiated,
Exactly.
but many generated methods return an IRelationPredicateBucket directly (e.g. ENTITY1.GetRelationInfoENTITY2(); )
No, I think they return an object that implements that interface, or you can say of IRelationPredicateBucket type, but actually the object is instanciated from the class not the interface.
IRelationPredicateBucket myObject = new RelationaPredicateBuckrt();
Can I use IRelationPredicateBucket objects instead of RelationPredicateBucket objects, and if not, can I just cast returned IRelationPredicateBucket objects directly to RelationPredicateBucket objects?
You can use the interface to define return types or parameters.
But Actually you should return an instance of a class that implements that interface.
In general stick with the class, if you don't have another class inheriting from the interface.