@ub-e/odata

OData(v4) provider for UnityBase EE. After call to OData.registerEndpoint UB enityties are accessible using OData protocol.

     var OData = require('@ub-e/odata');

     var endpoint = OData.registerEndpoint({
        endpointName: 'ODataV4',
        namespace: 'autotest',
        requireAuth: false,
        skipOptimisticLock: true,
        entitySetMapping: {
            ODataRef: App.domain.byName('tst_ODataRef'),
            ODataSimple: App.domain.byName('tst_ODataSimple')
        }
     });

See 04 OData tutorial for details.

We strongly recommend to use a ubql because it is easier, more convenient and faster than the OData

Tutorials:

Classes

ODataEndpoint

Methods

registerEndpoint(props)ODataEndpoint static

Register OData endpoint
Arguments:
  1. props (Object)
    Properties
    1. endpointName (String)
    2. namespace (String)  OData metadata namespace (application name, for example)
    3. [requireAuth=true] (String)
    4. [skipOptimisticLock=false] (Boolean)  If true will skip Optimistic Lock even for entities with mStorage.simpleAudit: true. If false - will use ETag value as a mi_modifyDate
    5. [entitySetMapping] (Object.<String, TubEntity>)  key-value, where keys is entitySet name & values is UB entity. If empty - filled from all domain entities