ruby-odata / odata

Simple OData Library for Ruby
MIT License
21 stars 30 forks source link

Use entity set name as the key for Service#entity_sets hash #2

Closed waj closed 1 year ago

waj commented 10 years ago

I think it makes more sense to use the name of the entity sets as the key for this hash. Otherwise, it will fail when there is more than one entity set with the same type.

plainprogrammer commented 10 years ago

The only concern I have is with the loss of ability to look up EntitySets based on the type they represent. I know you can have an EntitySet that represents a collection like FeatureProduct, which is a defined type and set in the OData V3 example service; but, it clarifies this possible collision by defining a BaseType attribute on the EntityType definition. At this time support for such specialized EntitySets are not supported. I would prefer a patch that brought along that feature along with this change, if it still proves necessary.