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
Methods
registerEndpoint(props) → ODataEndpoint
static
Register OData endpoint
Arguments:
-
props
(Object)
Properties
-
endpointName
(String)
-
namespace
(String)
 OData metadata namespace (application name, for example)
-
[requireAuth=true]
(String)
-
[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
-
[entitySetMapping]
(Object.<String, TubEntity>)
 key-value, where keys is entitySet name & values is UB entity. If empty - filled from all domain entities
props
(Object)
Properties
-
endpointName
(String)
-
namespace
(String)
 OData metadata namespace (application name, for example) -
[requireAuth=true]
(String)
-
[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 -
[entitySetMapping]
(Object.<String, TubEntity>)
 key-value, where keys is entitySet name & values is UB entity. If empty - filled from all domain entities