You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ruby_odata for generalised data discovery (see http://rgovdata.com), so ideally I want to rely 100% on metadata for access.
Perhaps I have missed something, or don't know the OData spec well enough, but while I can access the collections (@collections) and the entity types (@classes) and entity metadata (@class_metadata), it seems only a matter of convention that relates the collection to the associated entity. i.e. using just ruby_odata, I can't know in advance what entity will be returned from a given collection (but I can make a good guess).
e.g.
Given the following (a simplified version of this):
..then @collections is the array of EntitySet names from the EntityContainer collection, and @classes is the array of EntityType names with associated @class_metadata. In this example, "ATMSet" is a collection of "ATM" entities, but I only know that by linguistic inference.
There are two parts to what I'd like to be able to do:
given an OData::Service instance
then I can get the collections it offers (i.e. @collections, but exposed with a public getter)
given a collection
then I can get the entity type it contains / will return
The collection information is in the EntitySet definition (EntityType) but is currently not pulled/exposed by ruby_odata. I currently hack around these limitations, but it would be nice to have this formally supported by ruby_odata.
The text was updated successfully, but these errors were encountered:
I like the idea of being able to get information about the service from within ruby_odata.
Check out the develop branch. I have exposed collections on an OData::Service. The result is a hash where the key is the collection name and the value is the EntityType (as a string directly from the EDMX). Does this help you?
I am using ruby_odata for generalised data discovery (see http://rgovdata.com), so ideally I want to rely 100% on metadata for access.
Perhaps I have missed something, or don't know the OData spec well enough, but while I can access the collections (@collections) and the entity types (@classes) and entity metadata (@class_metadata), it seems only a matter of convention that relates the collection to the associated entity. i.e. using just ruby_odata, I can't know in advance what entity will be returned from a given collection (but I can make a good guess).
e.g.
Given the following (a simplified version of this):
..then @collections is the array of EntitySet names from the EntityContainer collection, and @classes is the array of EntityType names with associated @class_metadata. In this example, "ATMSet" is a collection of "ATM" entities, but I only know that by linguistic inference.
There are two parts to what I'd like to be able to do:
The collection information is in the EntitySet definition (EntityType) but is currently not pulled/exposed by ruby_odata. I currently hack around these limitations, but it would be nice to have this formally supported by ruby_odata.
The text was updated successfully, but these errors were encountered: