•New: $expand query option now also applies for blobs. In previous versions, clients could request associations to be inline in JSON response by using the $expand query option in format "$expand=Customer". Now you can also ask for blob properties to be inline (as base64 string) in the JSON response, by providing the name(s) of blob properties in the $expand query option. For example, "$expand=Photo".
•Improved: Polymorphism when deserializing JSON objects allows deserializing both PODO and XData/Aurelius entities using the same method. For example, suppose a service operation (server-side method) that receives a parameter of type "TObject". Clients can now send either a PODO object or a Aurelius entity object to that method, and either will be serialized correctly. In previous versions it would consider everything as PODO and wrongly serialize the Aurelius entity.
•Fixed: Multiple calls to TXDataWebDataset.ApplyUpdates could cause some errors. That would happen if in the second call to ApplyUpdates, the modifications of the first call were not yet sent to the server, causing the same delta to be processed twice.
Version 4.6 (Jul-2019)
•New: HttpPatch attribute to specify service operations responding to PATCH HTTP method.
•New: macOS 64 support in Delphi Rio 10.3.2
•Fixed: Swagger not including all service operation actions when the actions endpoints were the same.
Version 4.5 (Jun-2019)
•New: Support for SwaggerUI provides a built-in web-based environment to test the API from the browser.
•New: EnableEntityKeyAsSegment property allows single-entity URL endpoints to follow the format "entity/id" - for example, customer/10, in addition to existing default format customer(10).
•Improved: String and enumeration literals now can be sent in URL without being enclosed by single quotes (e.g., CustomerByName?Name=John instead of CustomerByName?Name='John').
•Fixed: TXDataWebClient invoking service operations with default parameters was requiring all parameters to be passed, including the ones with default values.
Version 4.4 (Mar-2019)
•Fixed: Index out of range error in TMS XData Web Application Wizard when XData server has no entities.
•Fixed: Generated XData Web Application not supporting filtering by subproperties (e.g., Invoice/Customer/Name eq 'John').
Version 4.3 (Jan-2019)
•New: XData Server wizards generate XData server applications using the new design-time components instead of pure code. The generated application is now way easier to maintain and evolve, given it uses the RAD approach with design-time components. There is now wizard for server as VCL application. Next versions will include console application, Apache module or Windows service.
•Improved: All demos refactored, now using the new non-visual components: TXDataServer, TAureliusConnection, TXDataConnectionPool and TSparkleHttpSysDispatcher, making them easier to understand for beginners and easier to change them.
•Improved: TXDataWebClient.OnLoad method now provides the newly created entity in the Args.Result property, when using Post method.
•Fixed: TXDataWebClient.OnRequest event not being called when executing service operations with RawInvoke method.
•Fixed: Workaround a bug in Delphi Rio causing serialization of TJSONNumber values to be always serialized as null (TJSONNumber.Null always returning true).
•Fixed: Type mismatch when passing an empty array to a service operation that receives the dynamic array as var/out parameter.
•Fixed: XData Service wizard did not appear if there was no open project in IDE.
•Fixed: Inoffensive memory leak in TSparkleHttpSysDispatcher when the dispatcher was never activated.
•Fixed: TXDataWebDataset now creates TFloatField field for XData properties of type Currency, instead of TCurrencyField (unsupported in TMS Web Core clients).
•Fixed: XData Music Demo was issuing JSON Web Tokens with wrong expiration date/time.
•Version 4.2 (Dec-2018)
•Improved: TXDataWebConnection now "disconnects" (cleans model object, requiring a new connection) when URL is modified.
•Fixed: Workaround for a bug in Delphi Rio causing JWT tokens to be always rejected due to expiration (TJSONNumber.Null always returns true).
•Fixed: TXDataWebClient.RawInvoke did not allow to receive a full JSON object as a single parameter.
•Fixed: XData Web App Application Wizard incorrectly created TExtendedField fields for Int64 types on the server.
•Fixed: Typo in the generated XData service code: "form the client" should be "from the client".
Version 4.1 (Nov-2018)
•New: XData Web Application Wizard to generate GUI to perform CRUD operations on entities. You can now generate a web application that allows users to insert, modify and/or delete entities.
•New: Support for Delphi 10.3 Rio.
•Fixed: TTime fields not correctly supported in TXDataWebDataset.
•Fixed: XData Service Wizard created new service units in the first project of a project group. New services will be created in the currently active project now.
Version 4.0 (Nov-2018)
•New: XData Web App Generator wizard. This wizard creates a complete TMS Web Core client app based on a responsive Bootstrap template. The generated application should be based on an XData server and will provide a user-interface for listing XData server entities, including searching, ordering and pagination.
•Improved: TXDataWebDataset.Load now automatically connects the TXDataWebConnection if it is not connected.
•Improved: TXDataServerModule.SetEntitySetPermissions supports '*' as the entity set name which will be considered the default permissions for all entity sets.
•Improved: TXDataClientResponse.ResultAsArray and ResultAsObject for quick access to Result as a Json array or object.
•Fixed: TXDataWebClient.RawInvoke did incorrectly require parameters of type "out".
•Fixed: TXDataWebDataset did not set correct datetime values for the entity properties.
Version 3.2 (Sep-2018)
•New: TXDataWebDataset properties QueryTop, QuerySkip, ServerRecordCount, ServerRecordCountMode. This makes it easier to retrieve paged results from the server (QueryTop, QuerySkip) and retrieve the total number of records on the server (ServerRecordCount, ServerRecordCountMode). This number does not take the page number and page size into account.
•New: TJwtMiddleware.AllowExpiredToken and ForbidAnonymousAccess properties. This makes it easier to reject requests with expired tokens or requests without tokens (anonymous). Just set these properties. This is a breaking change as the middleware now rejects expired tokens by default. Please refer to the TMS Sparkle documentation for more information.
•New: TCorsMiddleware middleware makes it straightforward to add CORS support to any Sparkle module. Please refer to the TMS Sparkle documentation for more info.
•Improved: XData Music Demo includes options for ordering, paging and filtering (search) of listed records.
•Improved: "New TMS XData Server" Wizard adds commented code to include CORS and Compress middleware. Uncomment the generated code to easily enable the features.
•Improved: URIPathSegment attribute with empty string can be inside a service contract; it supports creating service operations at the "root" of the server.
•Fixed: TXDataWebDataset now correctly creates TStringField for GUID properties (TGuidField is not supported in TMS Web Core).
•Fixed: Removed memory leaks in desktop client of the JWT Auth demo.
•Fixed: "New TMS XData Server" wizard updated with option to use new TMS Aurelius native database drivers.
Version 3.1 (Jul-2018)
•New: XData Music Web Application demo. A complete web application example using a TMS XData server with TMS Web Core as web front-end. Full source code is provided, and the online version of the demo is available at https://app.devgems.com/xdata/music/app.
•New: TXDataWebClient.ReferenceSolvingMode allows automatic solving of $ref occurrences in JSON response, which is now the default behavior.
•New: Demos XData Web-Client Framework, showing use of TXDataWebClient, TXDataWebDataset and integration with FNC Grid
•New: TXDataWebConnection.OnResponse event intercepts all successful HTTP requests made by the XData web client framework (3.1.1).
•Fixed: Servers with Int64 type in model were not supported when used from TMS Web client (3.1.1).
Version 3.0 (Jul-2018)
•New: Full-featured TMS XData Web-Client Framework provides RAD, design-time and high-level components for building web applications using TMS Web Core and TMS XData. Buildling a REST API-based web application has never been as easy. This includes dataset-like usage that feels home to Delphi developers.
•New: TXDataWebClient.RawInvoke allows low-level invoking of service operations from TMS Web Core applications.
•New: TXDataWebConnection.OnRequest and TXDataWebClient.OnRequest events allow intercepting and modifying outgoing requests (for example, to add authentication headers).
•New: TXDataWebDataset.CurrentData provides the underlying JSON object of the current web dataset record.
•New: TXDataWebConnection.OnError event which is fired whenever an error happens while performing requests to XData server from TMS Web Core apps.
•New: TXDataWebClient request methods (List, Get, Post, RawInvoke, etc.) now have overloaded methods that accept callback functions.
•New: TXDataWebConnection.Open method allows for providing callbacks for connection successful and connection error.
•New: TXDataWebConnection.DesignData allows for adding custom headers at design-time (for example authorization) to properly connect to XData server.
•Improved: Smooth design-time experience with TXDataWebDataset. Manually loading field defs is not necessary anymore - just connect a dataset to a web connection, provide the URL and fields will be loaded automatically at both design-time or runtime. Design-time menu option "Load Field Defs" has been removed.
•Improved: Editing TXDataWebDataset.EntitySetName at design-time in object inspector now provides a combobox with the list of available names retrieved from the server.
•Improved: Dataset fields now supported in TXDataWebDataset. They will contain data (list of objects) for associated lists (many-valued associations).
•Improved: TXDataWebDataset.SetJsonData now accepts non-array values (to edit a single object, for example).
•Improved: TXDataWebClient.Get overloaded method allows for passing an additional query string (to use $expand option for example).
•Improved: TXDataServerModule.Create overload requires just BaseUrl - no database connection pool is needed. Useful for XData servers that do not connect to a database or have a specific database usage.
•Improved: TMS Web Core-only TXDataConnection and TXDataDataset components have been renamed to TXDataWebConnection and TXDataWebDataset. This is a breaking change.
•Fixed: Exceptions that were not inherited from EXDataHttpException were wrongly reporting an error code (regression)
•Fixed: Memory leaks when using mobile/Linux compilers (when using automatic reference counting)
Version 2.9 (May-2018)
•New: OnModuleException event allows for a more flexible custom error-handling processing of exception raised during XData processing request.
•Fixed: OnEntityModifying event was being fired before merge operation thus not providing correct information about the object in manager and previous state. Breaking change that can be disabled by using _FixEntityModifyingOnUpsert := False
•Fixed: deserialization of array of objects was keeping the same instance for all objects in the array.
Version 2.8 (Feb-2018)
•New: TMS RADical WEB enabled! The TMS framework for front-end Web development; XData users now have a high-level framework to write Web clients, by using the new TXDataConnection, TXDataDataset and TXDataWebClient components to access XData servers.
•New: TXDataClient.Count method. Allows retrieving the number of entities in a specific resource endpoint, optionally using a query filter
TotalCustomersFromLondon := XDataClient.Count('$filter=City eq ''London''');
•New: TQueryParser.AddMethod allows registering custom SQL Functions to be called from XData query API. Using TMS Aurelius you can add custom SQL functions to use from LINQ. You can now also register such a method in XData so clients can use such functions from the XData API:
TQueryParser.AddMethod('unaccent', TQueryMethod.Create('unaccent', 1));
Then use it from query API:
http://server:2001/tms/xdata/Customer?$filter=unaccent(Name) eq 'Andre'
•New: /$model built-in URL returns metadata for the whole XData API.
•New: MultiTentant Demo included in distribution shows how to use XData with multi-tentant applications (multiple databases being accessed by the same server). The demo shows how to specify the tentant by different URL or by using a custom HTTP header.
•Improved: A connection was being retrieved from the pool even when the context manager was not being used by a service operation.
•Fixed: Service operations invoked via GET method using enumerated type parameters are now supported.
Version 2.7 (Oct-2017)
•New: OpenAPI/Swagger support! XData servers provide a JSON file containing the OpenAPI Specification (OAS, formerly Swagger) for your whole server API. This opens up a lot of possibilities, usage of several tools of the OpenAPI ecosystem is now possible. Main one is the Swagger UI, a web front-end to describe and test your API.
•New: Several new types supported in service operations. Lots of new Delphi types can now be (de)serialized to JSON, meaning that these types can be used in service operations, either as input parameters, or as function results, or even as properties of PODO objects sent/received. The new supported types include:
oGeneric arrays: values of type TArray<T>, where T can be any supported type;
oGenerics lists of primitive types: values of type TList<T>, where T can by any supported type. In previous versions only lists of objects were supported;
oSets: values of type "set of T" where T is an enumerated type.
•New: Support for default parameter values in service operations. You can now specify default values as parameters in service operations, using the [XDefault] attribute, and make them not required when invoking the service operations from non-Delphi clients (default parameters were already supported in Delphi clients).
•New: JsonInclude attribute in PODO classes. You can configure how properties/fields with default values will be serialized in PODO classes. This attribute makes it possible to have a smaller JSON representation, by removing properties which value is null, zero, empty string, etc. Usage example: [JsonInclude(TInclusionMode.NonDefault)].
•New: JsonNamingStrategy attribute. Allows you to automatically define a strategy for naming the JSON properties based on the field/property names of the class. You can use several predefined strategies: default, identity, camelCase, snake_case, identityCamelCase, identity_snake_case.
•New: JsonEnumValues attribute. You can use this attribute to specify different values when serializing enumerated values.
•New: TXDataRequestHandler.ManagedObjects property. This property provides more flexibility when it comes to automatic memory management at server side, allowing you to add objects to that collection and don't worrying about destroyed them.
•Fixed: Error when using params of type TDate (TDateTime was not affected) in service operations (Regression).
•Fixed: Design-time wizard icon not showing correctly in Delphi 10.2 Tokyo.
Version 2.6 (Jul-2017)
•New: XDataProperty and XDataExcludeProperty attributes. When converting Aurelius entities to/form JSON, by default XData serializes all (and only) fields/properties that are mapped using Aurelius attributes. You can now include other (transient) properties or fields in JSON by using XDataProperty attribute. You also have the option to exclude an existing mapped member by using XDataExcludeProperty attribute.
•New: JsonProperty and JsonIgnore attributes. When serializing regular Delphi objects (DTO) to JSON, XData includes all class fields by default. You can use JsonProperty attribute to add properties to the JSON (and/or change their name in JSON object) and use JsonIgnore attribute to exclude fields from JSON.
•New: Support for passing parameters by reference in service operations. You can now declare and use service operations (methods) that receive parameters by reference. A server method like Swap(var A, B: Integer) is now supported for both server-side and client-side (using TXDataClient or regular HTTP requests).
•New: Filter functions startswith, endswith and contains. You can now perform $filter queries with those functions to search for substrings in entity fields. For example: ?$filter=contains(Name, 'Walker') or startswith(Name, 'John').
•New: Filter function concat. You can now use concat function when performing queries to concatenate two or more strings. For example: ?$filter=concat(concat(FirstName, ' '), LastName) = 'James Smith'.
•New: TXDataSeverModule.UnknownMemberHandling property. You can now optionally tell the server to ignore unknown JSON properties sent by the client (instead of raising an InvalidJsonProperty error).
•Fixed: Using TStream as a parameter for service operations was causing "JSON converter not found" error.
Version 2.5 (May-2017)
•New: Linux support using Delphi 10.2 Tokyo and later. Using XData on Linux doesn't require any specific change in your XData-related code. All your Linux specific code relates to TMS Sparkle - creating an Apache module and configuring TMS Sparkle to respond to requests. Once you do that, you just add the XData module to the Sparkle dispatcher as usual.
•Fixed: Location header of POST responses now uses host of the client request, not the host configured in XData module.
version 2.4 (Mar-2017)
•New: Delphi 10.2 Tokyo Support
•Fixed: Server-side stack overflow when trying to load a proxy property sent by the client, if the parent entity of that proxy was merged into the current Object Manager
version 2.3 (Jan-2017)
•New: Demo project showing authentication using JWT (JSON Web Token)
•Fixed: Sporadic server error loading proxied lists sent by the client
•Fixed: JWT encoding not working on XE6
•Fixed: XData Server Wizard generating corrupted source code when TMS Component Pack was installed
version 2.2 (Aug-2016)
•New: Url convention now allows $count path segment to retrieve number of entities in a resource.
•Fixed: RefCount property was wrongly being serialized in PODO objects from mobile clients
•Fixed: TXDataClient.Service<T> failing for Android clients when compiling in Release config
version 2.1 (Jul-2016)
•New: $expand query option allows clients to have full control on how associated entities appear in JSON response.
•New: Support for entities that have associations in ID (primary key containing foreign keys)
•New: Support for Variant-type parameters in service operations when using GET HTTP method.
•New: TXDataServerModule.SerializeInstanceRef property controls how instances of same object will be represented in JSON response
•New: TXDataServerModule.SerializeInstanceType property controls how xdata type metadata will appear in JSON response
•New: Support for Nullable<T> values in PODO classes
•Improved: Errors on query syntax now return http code 400 instead of 500
•Fixed: JSON Proxies (@xdata.proxy) sent by the client were not being solved when reading such properties at server-side
•Fixed: Association references (@xdata.ref) were not being solved when receiving entities in service operations parameters.
version 2.0 (May-2016)
•New: Service operations can now receive and return any type of object. This increases flexibility significantly as you can use any type of object for structure input/output parameters, or to send/receive DTO classes, etc.
•New: Server-Side Events allow subscribing listeners events and perform additional server-side logic
•New: JWT (Json Web Token) authentication and Basic authentication, thanks to new TMS Sparkle
•New: Delphi 10.1 Berlin support
•New: Service operations can now receive and return TJSONAncestor objects (Delphi XE6 and up only). This allows full control over the JSON request and response.
•New: $inlinecount query option allow retrieving the total number of entities when using paged results
•New: TXDataServerModule.SetEntitySetPermissions allows configuring what operations are available in each resource type
•Improved: All server-side operation (entity CRUD, service operation execution) are now performed in database transactions
•Improved: TXDataOperationContext.Current now also available in entity resources
version 1.6 (Feb-2016)
•New: Design-time wizard to create a XData Server with a few clicks
•Fixed: Service operation using enumerated types as parameters or function results not working properly
•Fixed: EntitySet requests were not taking xdata-expandlevel header into consideration. This is a breaking change.
version 1.5.1 (Sep-2015)
•New: Delphi 10 Seattle support
version 1.5 (Aug-2015)
•New: Several built-in functions available to increase flexibility when querying objects in REST requests. New available functions are Upper, Lower, Length, Substring, Position, Year, Month, Day, Hour, Minute and Second
•New: TXDataClient.HttpClient property provides low level access to the Http client and allows using OnSendingRequest events to customize requests
•New: TXDataOperationContext Request and Response properties gives full control for service implementations to customize the processing of client requests
•New: TXDataServerModule.DefaultExpandLevel allows defining the expand level of JSON responses when it's not defined by client request
•Fixed: TXDataClient Get, Delete, Patch and Put operations were broken when using entities with composite id
•Fixed: POST requests not working correctly with entities with composite key
•Fixed: Data Modification requests sending content-type header with parameter (for example, ";charset=UTF8") were causing errors
version 1.4 (Jun-2015)
•New: HttpMethod attribute allows specifying the HTTP method a service operation should respond to
•New: URIPathSegment attribute allows specifying a different name for operation/service to be used in URL
•Fixed: GET requests with query order was sometimes causing the same column to appear multiple times in a "ORDER BY" SQL clause
version 1.3.1 (Apr-2015)
•New: Delphi XE8 support
version 1.3 (Mar-2015)
•New: Support for CORS (Cross-origin resource sharing) preflighted requests
version 1.2 (Dec-2014)
•New: Android and iOS support for XData client objects
•New: Server support for "x-http-method-override" header (allowing clients to tunnel HTTP methods to server through POST requests)
•Fixed: Issues with floating-point literals in Query URL with non-English server systems
•Fixed: Service operations returning nil entities should respond with status code 404
version 1.1 (Oct-2014)
•New: Service Operations allow adding custom business logic to your server using interfaces and methods
•New: Multi-Model design makes it easy to create multiple servers with different mapping, types and service operations
•New: UserName and Password properties in TXDataServerModule for basic authentication protection
version 1.0.1 (Sep-2014)
•New: Delphi XE7 support
version 1.0 (Aug-2014)
•First public release