Data Access 2010.2714

Jul 13, 2010

What's New in Telerik OpenAccess ORM Q2 2010 (v2010.2.714)

  • Schema Update Wizard - This wizard (part of the round-trip support of the designer) allows creation and generation of database update scripts. You can also manage whether the script files are added to the project.
  • Round tripping designer - The Visual Designer for OpenAccess is now capable of handling forward mapping. It supports adding new entities and and creating new counterparts for them in the relational layer of the model.
  • Fluent Mapping API (Beta) - The new fluent mapping API allows for quick and strongly typed configuration of metadata model mappings that can be used for both forward and reverse mapping scenarios. It is really useful in code-only scenarios when no visual designer is required or available.
  • New Fetch Optimization API - New way of setting fetch optimizations on the OpenAccess data context. It incorporates a root class named FetchStrategy that supports fluent mapping style of defining the fetch dependencies. The fetch strategy can be produced during runtime and stored in a different place. It is calculated and used after it is assigned to a OpenAccess data context instance.
  • SQLite support - . Because it is a free database both the full and express versions of OpenAccess support it.
  • Mapping migration tool (Beta) - A conversion tool that can translate previous project versions to the new visual designer / rlinq infrastructure. The tool can also convert reveresemapping.config files to a new visual designer files.
  • Reverse Mapping wizard is now able to read Stored Procedures defined within an Oracle package - It is now possible to read stored procedures within a package and Reverse map them similar to other SPs
  • Use delimiters for sqlanywhere backend - The sybase sql anywhere backend is now putting delimiters around column and tables names by default.
  • Extended schema API - The schema API now exposes the complete schema creation functionality.
  • New OpenAccess menu - The OpenAccess menu in Visual Studio has been changed to better expose the new visual designer. If the old wizards should be used the old menu can be activated from the OpenAccess Options Dialog.
  • VSchema is now working with .Net 4.0 assemblies - VSchema.exe now has a config file that allows it to handle .Net 4.0 assemblies even if not running in a .Net 4.0 VM.
  • Design-time support for Wcf Ria Services Provider (Beta) - Provides wizard that adds a T4 template to a project. The transformation of the T4 template generates a DomainService class that can be used in the project.
  • Changed the Update from database wizard to not show unnecessary change set entries for view columns - Change set entries for the IsPrimaryKey, Shared, TargetClass and TargetField view column properties are no longer shown in the the Update from database wizard.
  • Backend Specific concurrency columns were not recognized as version columns by the default mapping in the DSL - The backend specific version columns and the fields mapped to them(Timestamp) are now tagged with the right concurrency control facets by the default mapping functionality.
  • LINQ: Improved support for DateTime constructor expressions - It is possible now to use expressions like
    from p in Scope.Extent<Person>() where p.Birthday = new DateTime(1967,3,29) select p
    The DateTime(int,int,int) and DateTime(int,int,int,int,int,int) methods are supported and will be converted to the corresponding SQL.
  • Renaming a class in the designer does not rename the assciated OID class if such exists. - If a class that has been renamed has an OID inner class, the OID class is now renamed along with its parent class.
  • MySql autoinc columns are now recognized automatically - Autoinc columns of MySql tables are now recognized automatically while reverse mapping a database.
  • New UI for the BackendConfiguration in the ModelSettings dialog - A comprehensive UI for the Backend Configurations has been added in the Model Settings Dialog.
  • Codegeneration: Generate to Project Folder - Now the files can be generated to a selectable project folder.
  • Codegeneration: Generate to sub-namespaces - Now the files can be generated to different folders automatically, based on their namespace.
  • Full support for Visual Studio 2010 - the visual designer is now working in Visual Studio 2010
  • Ria Services Provider (Beta) - supports all basic operations (query, insert, update, delete) in WCF Ria Services for .NET 4.0
  • New Enhancer - The enhancer has been replaced by a new implementation based on Mono.Cecil. This fixes all known enhancer bugs and speeds up the enhancing process as well.
  • Data Services Wizard integration - The Data Services Wizard is now integrated into the OpenAccess product. You can start it by using the DSL context menu.
  • Strings containing * or ? can now be used with Linq or OQL matches - An expression of the kind "X like ***" or "X like ???" was translated in SQL to "X like %%%" or "X like ___", therefore returning wrong results.
    This has been changed so that a single backslash in front of the * and ? wildcard will escape the wildcard substitution.
  • L2 cache eviction fix for managed inverse collection and referenced instances - When an instance is removed from the database that is referenced by a managed inverse collection, the referencing instance was not evicted from the L2 cache.
  • L2 cache eviction fix for managed inverse collections and new owner - When an OrderLine gets a new Order set, the Order (old/new) instances were not evicted from the L2 cache if the collection is inverse and managed.
  • Added MakeDirty to the OpenAccessContext - The context now exposes the MakeDirty functionality to the end user.
  • LINQ: Added support for pc.collection.Count(lambda) - Added support for expressions like where pc.collection.Count(x => x.field == param).
  • OpenAccessDataSource is now working with OpenAccessContext implementations - The OpenAccessDataSource is now working with the new OpenAccess version.
  • DSW - Auto generation of Silverlight application with Telerik Silverlight controls that consumes generated services. - works with Astoria v1, Astoria v2 and Silverlight-enabled WCF Services.
  • DSW - Added generic search method for WCF Web Services
  • DSW - Improved generated code for services.

What's Fixed

  • OpenAccessDataSource throws InvalidCastException - OpenAccessDataSource throws InvalidCastException when trying to set persistent properties of type Nullable<Guid>, it is working for the not nullable Guid type.
  • Initialize transient is not called during reference navigation - If an object is loaded by navigating over a reference the InitializeTransients function is not called.
  • The DSL does not handle nullable types correctly. - The nullable types are handled only with their names which for a nullable type is: "Nullable`1".
  • The CheckSettings wizard crashes if there are two projects with the same name in the solution - The CheckSettings wizard throws an ArgumentException: "An entry with the same key already exists" if the solution contains two or more projects with the same name.
  • Changing the model name through the model settings dialog was not reflected in the metadatamodel - Changing the model name is now working and the new model name is stored inside the xml rlinq file.
  • Fixed generation of non-CLS compliant field / property names - When a column is named _id, the resulting field _id was generated which immediately generated a warning for a non-CLS compliant identifier.
  • LINQ: Projection into known type from a joined expression fails - When projecting joined expressions into a known type (not an anonymous type), the generated SQL is wrong.
  • The UpdateFromDatabase wizard does not resolve the |DataDirectory| directive - When the connection string of the domain model contains a |DataDirectory| directive, the database path is not resolved correctly and the database cannot be found.
  • Enhancer does not intercept field access in class constructor - If a persistent field is accessed inside a constructor of another class the call is not intercepted and the value might not be loaded from the database.
  • Silverlight Paging: OpenAccessDomainService throws an exception when total count is to be included in query - An 'not a method' exception is thrown when the Silverlight application uses paging, which includes the total count information.
  • Configuration fails with a cast exception - A cast exception can be thrown when an integer backend configuration value was modified.
  • Query: Exception thrown that a scalar variable must be declared when certain methods (like String.IsNullOrEmpty(parameter) ) are used - When certain methods (like string.IsNullOrEmpty(x)) translate to a SQL text like (x IS NULL OR x = ''), the duplicate use of x when it is actually a ? parameter causes an internal error that leads to a missing SQL parameter value.
  • LINQ: Testing the type of a reference with 'IS' produces incorrect SQL - The LINQ expression "pc.refField is pctype" produces wrong SQL.
  • LINQ: Support for LongCount() added - Support for Queryable.LongCount() was added.
  • LINQ: Support for expressions generated by the DataService request processor - Support for LINQ queries as generated by the DataServices request processor was improved (String.Contains(), multiple orderings)
  • Enhancer damages generic function call with reference parameter - If a generic function or a function of a generic type with a ref parameter is called and the ref parameter is a persistent field, the resulting assembly is damaged..
  • Enhancer cannot handle resources without binary content - If an assembly has an embedded resource that only contains string data, the enhancer throws a null reference exception.
  • If an assembly with a strong name is enhanced without passing in the key file the assembly is not readable - If an assembly with a strong name is enhanced and no key file or key container is passed to the enhancer, the resulting assembly is not readable because it still says that it has a strong name but the strong name is not present. Now it removes the strong name completely and can be signed by using the sn.exe tool.
  • LINQ: When ordering is two times on the same field, the generated SQL is wrong - When a LINQ expression tree like x.OrderBy(u => u.Id).ThenBy(c => c.Id) is encountered, the generated SQL was wrong.
  • LINQ: Enable handling of parameter.ToString() method calls in LINQ expressions - When an expression fragment like 'pc.stringfield == parameter.ToString()' is encountered, an exception was thrown.
  • OQL: NullReferenceException when query was already available from compiled query cache - When a query was cached, a null reference exception occured while reusing the query.
  • Visual Studio 2010: Assembly signing with .pfx file not working with enhancer - Assembly signing with key containers (generated by using .pfx files) did not sign the enhanced assembly.
  • Using VARBINARY as parameter type for GetSqlQuery() throws an exception - When using GetSqlQuery("[AStoredProc] ?",null,"VARBINARY val").Execute(new byte[5]), the execution failed as there was an exception thrown (Type not supported for setObject).
  • Persistent objects not serializable - The new enhancer does not add the nonserialize settings to the internal OpenAccess fields. This leads to an exception that the OpenAccess PCStateMan is not serializable.
  • The use schema name as a prefix setting does not work - The use schema name as a prefix setting does not work. Regardless of the status of this setting classes are generated without a prefix.
  • Dependency to VistaDB assembly prevents deployment of OpenAccess projects - The Telerik.OpenAccess.Adonet2 assembly has a dependency on the VistaDB.4 assembly. When deploying web applications, this dependency is the reason for a FileNotFoundException.
  • LINQ: Enumerable.Any() generates wrong SQL when used on a fk inverse collection - When a query like "var q = (from p in Scope.Extent<Northwind.Customer>() where p.Orders.Any() select p)" is made where the collection is an inverse collection (fk collection), the resulting SQL is wrong.
    Workaround: Use "var q = (from p in Scope.Extent<Northwind.Customer>() where p.Orders.Count() > 0 select p)"
  • Using ConnectionStrings with ODP not possible - The runtime will always use the MS Oracle ADO driver, not the ODP ADO driver.
  • LINQ: Comparing a persistent field against an empty collection throws exception. - When a persistent field is compared against a collection, it was required that the collection is not empty. This restriction has now been lifted.
  • Null reference exception during database update - If a class hierarchy is mapped horizontal and a collection mapping is specified at the base class the vschema.exe or the Visual Studio build process stops with a null reference exception. It is not allowed to specify a mapping on the horizontal mapped base class. All mapping nodes have to be moved to the derived classes and the fieldname has to be prefixed by the base class name.
  • OpenAccess expects the VistaDB design-time license to be registered during runtime - VistaDB has a separate design-time license to be used during development and a runtime license that needs to be embedded in the application. OpenAccess access the VistaDB API/engine for various design time tools (Visual Studio integration and VSchema.exe) as well as via the OpenAccess API during runtime. During runtime OpenAccess API expects the VistaDB designtime license to be registered.
    The OpenAccess designtime tools should use the VistaDB designtime license and the runtime API should rely on the VistaDB runtime license to be available.
  • OQL: NVARCHAR comparisons are not handled correctly. - When filtering is done against a NVARCHAR field, the resulting SQL should place an 'N' before the string that is compared against.
    Example: SELECT...WHERE p.Name = 'Александър'. This should be N'Aлександър'.
  • DSL: OpenAccess generates un-compilable code when the tables reside in multiple schemas. - The attributes generation has some glitches that are only visible when generating models that contain multiple schemas. We generate something like:
    Table("Address"SchemaName = "Person", )] and it should be: Table("Address", SchemaName = "Person")]
  • Null reference exception in the MetadataConverter while reading Oracle schemas. - The ParameterDefinitionsOld collection of the relational procedure is null.
  • ObjectContainer.CopyTo throws null reference exception - If an existing object in the container has a collection of other persistent objects and this collection is set to null instead of referencing an empty collection, a null reference exception is thrown in CopyTo or CommitChanges.
  • Attributes metadata source does not filter out the events from the persistent classes. - During metadata collection, event members are read as normal fields of persistent classes. We must filter out every delegate member of the persistent classes.
  • OpenAccess throws exceptions when we try to persist an object that contains a decimal property. - The reason for the behavior is that the schema reader returns "money" columns with 0 Length. That is different from the default value but we must avoid serializing it nevertheless.
  • DefaultMapping maps a 'nullable' column to a property of 'non-nullable' CLR Type. - The TypeResolver returns the value based on the underlying type, disregarding the nullability of the column.
  • One-to-many relations are not always correctly resolved when attributes mapping is used. - The creation of the inverse collections depends on the existence of the master members. They should always be read after we are sure all master members are resolved.
  • LINQ: Accessing the Value property of a query parameter leads to an exception - When accessing the Value property of a Nullable<X> instance that is used a as query parameter, an exception is thrown.
    Workaround: Avoid using nullable query arguments.
  • Error with OpenAccessDataSource and RadGrid when filtering on decimal field is being performed - In case of filtering in RadGrid binded to OpenAccessDataSource on decimal field a Telerik.OpenAccess.Exceptions.QueryException is being thrown.
  • VistaDB assembly requiered in .NET 4.0 asp application - If you are using OpenAccess with .NET 4.0 and the ajax script manager the VistaDB assembly is necessary. This dependency has to be removed.
  • L2 Cache Synchronization failure - The L2 cache synchronization using MSMQ fails immediately due to a timeout exception.
  • Many-to-many colections are not handling CUD operations on the slave end - In an m:n association, if one adds a new persistent object in the collection of the slave member, the objects is persisted, but no entry in the join table is being written.
  • LINQ: InvalidCastException when anonymous types are used coming from multiple dynamically created sources - When LINQ queries are generated by tools that themselves compile the linq expressions, anonymous types are created in a duplicate fashion (same structured type can exist multiple times in the process). This can generate invalid cast exceptions when reading the LINQ result set.
  • Inability to pass Unicode strings to SQL queries and stored procedure invocations - When using SQL queries or stored procedures through the IObjectScope.GetSqlQuery() method, there was no way to specify that a passed string (or an out parameter) should be handled correctly for non-latin character sets. The strings were passed as VARCHAR instead of a Unicode capable type like NVARCHAR/VARCHAR2.
    In order to use unicode string parameters, one must specify "NVARCHAR p1" for an input parameter with name p1 and "OUT.NVARCHAR p2" for an output parameter p2 in the type declaration of the GetSqlQuery() method.
  • OpenAccessDataSource is not using the Insert or Update parameters when those operations are being executed. - The OpenAccessDataSource exposes the Insert and Update parameters as well as the Where and Order By, but it only uses the later two for SELECT operations. The Insert and Update parameters are not taken into account when the corresponding operations are being executed.
  • LINQ: Using ternary operator (x ? t : f) fails when t and f compare for equality - When using the ternary operator with an equality operation in the true or false part, the generated SQL is wrong.
  • LINQ: Runtime support for DateTime.Date property; Throwing an exception when DateTime property is not supported. - When the property DateTime.Date is accessed, the correct SQL code for extracting the date part is not generated and no exception message appears.
  • DSL: Potential difference between enhancement and runtime settings leading to unloaded primitive fields - When the new designer is used, there is a potential difference in the way default fetch group fields are calculated during runtime and design time. This can lead to incorrect values (nulls) showing up as the field content.
  • MSDE not detected as free database - The Microsoft Desktop Engine (MSDE) is a free database and the OpenAccess express edition should support it.
  • Serialize to blob not working with new metadata - If a field is marked as SerializeToBlob in the new metadata definition the enhancer throws a type not supported exception if the referenced type is not persistent.
  • Persistent Types are not always correctly resolved in Visual Basic projects - The problem comes from the fact that the full name of the clr types in Visual basic is different then the one in C#. In visual basic, the namespace is different then the one in the VB .NET code, the difference is that in the runtime the default project namespace is added to as prefix to the class namespace as well.
  • The namespace of the OpenAccess classes is not changed when the user changes the namespace of the model from the model settings dialog - The namespace of the classes remains the same even if they have been in the default namespace and the user has changed that namespace.
  • Null reference exception while reading Oracle schemas - It is not possible to read Oracle schemas with the default driver when adding a Domain Model item to a project - the SchemaReader throws an exception. Workaround: the ODP driver should be used instead.
  • The Add new item wizard does not allow to select Oracle ODP connections - When a connection using the ODP driver is selected on page one, advancing to page two is not possible.
  • DSL: Adding self-reference associations to a class is not possible - When a class is not associated with a self-reference constraint, adding such relation is not possible in the designer.
  • Details editor: The list view in the relationships page should not allow sorting - The listview items are not ordered properly when sorting by column is applied.
  • DSW - Second screen will be shown only if you have more than one RLINQ model in the DAL
  • DSW - Fixed setting of Astoria v2 required environment variables
Have a feature request?

Post your feedback via the Data Access feedback portal or the public forums

What's new across all Telerik products?

See the updates feed

Next Steps

Download for free

Get your fully functional free copy of Data Access.

Get Data Access Sample Kit

Including demos and articles to get you started.

Suggest new features

Help us shape our roadmap.