Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ This document describes how entities are represented in a published OData servic
| Binary (not supported) ² | | | |
| Boolean | Edm.Boolean | true | true |
| Date and time | Edm.DateTimeOffset | Fri, 19 Dec 2014 10:27:27 GMT | 2014-12-19T10:27:27.000Z |
| Enumeration | Enumeration⁴ (OData v4) or Edm.String (OData v3) | Color.Blue | Blue |
| Enumeration | Enumeration (OData v4) or Edm.String (OData v3) | Color.Blue | Blue |
| Big decimal | Edm.Decimal | 0.3333333333333333333333333333333333 | 0.3333333333333333333333333333333333 |
| Hashed string | Edm.String | HashPassword | HashPassword |
| Integer | Edm.Int64 | 50 | 50 |
| Long ¹ | Edm.Int64 | 3940649673954387 | 3940649673954387 |
| String ³ | Edm.String | John | John |
| String exposed as GUID ⁴ | Edm.Guid | 1B4E28BA-2FA1-11D2-883F-0016D3CCA427 | 1b4e28ba-2fa1-11d2-883f-0016d3cca427 |

<small>¹ When using Excel to import an OData source, long numbers may seem cut off. This is due to a restriction in the data type Microsoft uses. For more information, see [Last digits are changed to zeroes when you type long numbers in cells of Excel](https://support.microsoft.com/en-us/kb/269370).<br />
² Even though the binary data type is not supported, the FileDocument and Image system entities are supported and represented as Base64-encoded strings with the `Edm.Binary` type.<br />
³ When the string attribute has a limited length, the `MaxLength` attribute is specified. </small>
⁴ In Studio Pro 9.23 and below, all enumeration attributes were published as strings.
³ When the string attribute has a limited length, the `MaxLength` attribute is specified.<br />
⁴ For more information, see the [Exposed As](/refguide/published-odata-attribute/#exposed-as-guid) section of *Published OData Attribute*.</small>

Additionally, the `updated` field for an entry in OData comes from the system changedDate attribute of an entity. If this attribute is not available (because it is not published, the user does not have access rights, or it is empty in database), the default date (1-1-1970) will be used.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,19 @@ The type of the attribute.

### Exposed As {#exposed-as}

This field is shown when the type is an enumeration that was previously exposed as a string, and only for OData v4. Change the value to **Enumeration** to publish the enumeration. This informs clients of the possible values of this attribute.
This field is shown in the following cases:

* The type is an enumeration that was previously exposed as a string (only for OData v4). Change the value to **Enumeration** to publish the enumeration. This informs clients of the possible values of this attribute.
* The type is a string (only for OData v4). Change the value to **GUID** to publish the string attribute as a GUID. For more information, see the [Exposing a String Attribute as a GUID](#exposed-as-guid) section below.

#### Exposing a String Attribute as a GUID {#exposed-as-guid}

When you expose a string attribute as a GUID, the following applies:

* The attribute must be a string with unlimited length or a maximum length of at least 36 characters, and store GUIDs in a format such as `1b4e28ba-2fa1-11d2-883f-0016d3cca427`.
* If the value stored at runtime cannot be parsed as a GUID, the runtime throws an error.
* Clients can specify GUIDs in uppercase or lowercase letters. The runtime always returns GUIDs in lowercase letters.
* If a `POST` or `PUT` request attempts to set a value that is not a GUID, the runtime returns a `422` status code.

### Capabilities

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ This document describes how entities are represented in a published OData servic
| Integer | Edm.Int64 | 50 | 50 |
| Long ¹ | Edm.Int64 | 3940649673954387 | 3940649673954387 |
| String ³ | Edm.String | John | John |
| String exposed as GUID ⁵ | Edm.Guid | 1B4E28BA-2FA1-11D2-883F-0016D3CCA427 | 1b4e28ba-2fa1-11d2-883f-0016d3cca427 |

<small>¹ When using Excel to import an OData source, long numbers may seem cut off. This is due to a restriction in the data type Microsoft uses. For more information, see [Last digits are changed to zeroes when you type long numbers in cells of Excel](https://support.microsoft.com/en-us/kb/269370).<br />
² Even though the binary data type is not supported, the FileDocument and Image system entities are supported and represented as Base64-encoded strings with the `Edm.Binary` type.<br />
³ When the string attribute has a limited length, the `MaxLength` attribute is specified. </small>
⁴ In Studio Pro 9.23 and below, all enumeration attributes were published as strings.
³ When the string attribute has a limited length, the `MaxLength` attribute is specified.<br />
⁴ In Studio Pro 9.23 and below, all enumeration attributes were published as strings.<br />
⁵ Available in Studio Pro 10.12 and above. For more information, see the [Exposed As](/refguide10/published-odata-attribute/#exposed-as-guid) section of *Published OData Attribute*.</small>

Additionally, the `updated` field for an entry in OData comes from the system changedDate attribute of an entity. If this attribute is not available (because it is not published, the user does not have access rights, or it is empty in database), the default date (1-1-1970) will be used.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,19 @@ The type of the attribute.

### Exposed As {#exposed-as}

This field is shown when the type is an enumeration that was previously exposed as a string, and only for OData v4. Change the value to **Enumeration** to publish the enumeration. This informs clients of the possible values of this attribute.
This field is shown in the following cases:

* The type is an enumeration that was previously exposed as a string (only for OData v4). Change the value to **Enumeration** to publish the enumeration. This informs clients of the possible values of this attribute.
* The type is a string (only for OData v4). Change the value to **GUID** to publish the string attribute as a GUID. For more information, see the [Exposing a String Attribute as a GUID](#exposed-as-guid) section below.

#### Exposing a String Attribute as a GUID {#exposed-as-guid}

You can expose a string attribute as a GUID in Studio Pro 10.12 and above. The following applies:

* The attribute must be a string with unlimited length or a maximum length of at least 36 characters, and store GUIDs in a format such as `1b4e28ba-2fa1-11d2-883f-0016d3cca427`.
* If the value stored at runtime cannot be parsed as a GUID, the runtime throws an error.
* Clients can specify GUIDs in uppercase or lowercase letters. The runtime always returns GUIDs in lowercase letters.
* If a `POST` or `PUT` request attempts to set a value that is not a GUID, the runtime returns a `422` status code.

### Capabilities

Expand Down
Loading