tag:blogger.com,1999:blog-39556247813685906022024-03-19T17:12:20.381+05:00DataObjects.Net Team BlogNews, examples, tips, ideas and plans. Thoughts around ORM, .NET and SQL databases.Anonymoushttp://www.blogger.com/profile/13800929290476802273noreply@blogger.comBlogger219125tag:blogger.com,1999:blog-3955624781368590602.post-69536463645671366292018-10-31T19:38:00.000+05:002018-10-31T19:38:00.891+05:00DataObjects.Net Core 0.1.0 Beta 1<div dir="ltr" style="text-align: left;" trbidi="on">
We finally ported DataObjects.Net to .Net Standard. This version is based on DataObjects.Net 5.0.17 Final so it includes all features released up to 5.0.17.<br />
<br />
We decided to release only main library (MS SQL Server provider is included) and extensions as we had tested them. Other providers will be added as we test them. Unfortunately if RDBMS has no client library for .Net Standard we won't be able to port its provider, but there are only few of them.<br />
<br />
Also <u>PLEASE NOTE</u>, that this is very first version and thought main functions work well there might be some issues in some particular cases. Also we have plans to rethink some of our public and internal APIs so there might be breaking changes. We started releasing from major number 0 intentionally to underline that. As long as it is 0 there might be breaking changes.<br />
<br />
You can get the release from <a href="https://www.nuget.org/profiles/xtensive">NuGet library</a></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com85tag:blogger.com,1999:blog-3955624781368590602.post-17625112653574603892018-02-15T17:17:00.000+05:002018-02-15T17:18:14.680+05:00DataObjects.Net 5.0.17 Beta 3<div dir="ltr" style="text-align: left;" trbidi="on">
We have released a new version of DataObjects.Net<br />
<br />
In the version following changes were performed:<br />
<br />
<span style="background-color: #cccccc;">[main]</span> Fixed certain scenarios when In() or Contains() operations in query led to NullReferenceExecption exception<br />
<span style="background-color: #cccccc;">[main]</span> Persist operation no longer breaks enumeration of EntitySet items.<br />
<br />
Detailed explanation of these changes is in the post.<br />
<br />
As usual you can get it from <a href="http://get.dataobjects.net/Download">our website</a> or install from <a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.17-Beta-3">Nuget library</a>.<br />
<br />
<br />
<a name='more'></a><h3 style="text-align: left;">
NullReferenceException during query translation</h3>
Sometimes inclusion of a static fields in operations like In() or Contains() resulted in the exception. Instance fields are handled correctly though. For example,<br />
<b><br /></b>
<b> </b><span style="font-family: Courier New, Courier, monospace;"><b>[<span style="color: #45818e;">TestFixture</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public class</span> <span style="color: #45818e;">ContainsTest</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #6aa84f;">// ...</span></b></span><br />
<span style="color: #6aa84f; font-family: Courier New, Courier, monospace;"><b> // some other members </b></span><br />
<span style="color: #6aa84f; font-family: Courier New, Courier, monospace;"><b> // ...</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">private static int</span> StaticItemId = 1;</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">private int</span> InstanceItemId = 1;</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">Test</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public void</span> MainTest()</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> domain = Domain.Build(GetDomainConfiguration())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> session = domain.OpenSession())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> trasnaction = session.OpenTransaction()) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">var</span> ids = <span style="color: blue;">new</span>[] {1, 2};</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #6aa84f;">// works fine</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">var</span> count = session.Query.All<<span style="color: #45818e;">TestEntity</span>>()</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> .Count(e => ids.Contains(InstanceItemId)));</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #6aa84f;">// used to be a problem</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">var</span> count = session.Query.All<<span style="color: #45818e;">TestEntity</span>>()</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> .Count(e => ids.Contains(StaticItemId)));</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<br />
Now both cases work fine.<br />
<h3 style="text-align: left;">
Persist operation terminates EntitySet items enumeration </h3>
Saving local changes to storage while EntitySet<T> collection is being enumerated caused an exception due to the modification of collection. For instance,<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><b><span style="color: blue;"> using</span> (<span style="color: blue;">var</span> domain = <span style="color: #45818e;">Domain</span>.Build(GetDomainConfiguration())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> session = domain.OpenSession())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> transaction = session.OpenTransaction()) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> </b></span><b style="font-family: "Courier New", Courier, monospace;"><span style="color: #38761d;">//get order with some items</span></b><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">var</span> order = session.Query.All<<span style="color: #45818e;">Order</span>>().First();</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> </b></span><b style="font-family: "Courier New", Courier, monospace;"><span style="color: #38761d;">// locally added item</span></b><br />
<span style="font-family: Courier New, Courier, monospace;"><b> order.Items.Add(<span style="color: blue;">new</span> <span style="color: #45818e;">OrderItem</span>());</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">foreach </span>(<span style="color: blue;">var</span> orderItems <span style="color: blue;">in</span> order.Items) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #38761d;">// there are no changes to the collection performed</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #38761d;">// forces local changes to be saved to storage explicitly</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> session.SaveChanges();</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<br />
And an example of implicit saving of changes<br />
<br />
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> domain = <span style="color: #45818e;">Domain</span>.Build(GetDomainConfiguration())</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> session = domain.OpenSession())</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> transaction = session.OpenTransaction()) {</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> </span></b><b><span style="font-family: Courier New, Courier, monospace;"><span style="color: #38761d;">//get order with some items</span></span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: blue;">var</span> order = session.Query.All<<span style="color: #45818e;">Order</span>>().First();</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"><span style="color: #38761d;"> // locally added item</span></span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> order.Items.Add(<span style="color: blue;">new</span> <span style="color: #45818e;">OrderItem</span>());</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"><br /></span></b>
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: blue;">foreach</span> (<span style="color: blue;">var</span> orderItems <span style="color: blue;">in</span> order.Items) {</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: #38761d;">// there are no changes to the collection performed</span></span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> <span style="color: #38761d;">// implicit saving</span></span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> var orderItemCount = session.Query.All<<span style="color: #45818e;">OrderItem</span>>().Count();</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> }</span></b><br />
<b><span style="font-family: Courier New, Courier, monospace;"> }</span></b><br />
<br />
Basically, an EntitySet<T> collection consists of three sets - the first set of items is saved to the database, the second set consists of locally added items and the third one is locally removed items. Two last sets store changes of collection between savings them to the storage. A persist operation (saving changes) merges all the three sets into the first one, which caused an exception during enumeration.<br />
<br />
This merge mechanism was changed. Now only user changes can be the cause of enumeration termination. If a user adds or removes something from the EntitySet instance which is being currently enumerated it will break the enumeration. See example below:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> domain = <span style="color: #45818e;">Domain</span>.Build(GetDomainConfiguration())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> session = domain.OpenSession())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> transaction = session.OpenTransaction()) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> </b></span><b style="font-family: "Courier New", Courier, monospace;"><span style="color: #38761d;">//get order with some items</span></b><br />
<b style="font-family: "Courier New", Courier, monospace;"><span style="color: blue;"> var</span> order = session.Query.All<<span style="color: #45818e;">Order</span>>().First();</b><br />
<b style="font-family: "Courier New", Courier, monospace;"> <span style="color: #38761d;">// locally added item</span></b><br />
<span style="font-family: Courier New, Courier, monospace;"><b> order.Items.Add(<span style="color: blue;">new</span> <span style="color: #45818e;">OrderItem</span>());</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">foreach</span> (<span style="color: blue;">var</span> orderItems <span style="color: blue;">in</span> order.Items) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #38761d;">//we change contents of the EntitySet</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> order.Items.Add(<span style="color: blue;">new</span> <span style="color: #45818e;">OrderItem</span>());</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<br />
Here, the EntitySet<Order> collection was modified during enumeration so it should be terminated.<br />
<br />
Another case when user implicitly changes EntitySet is a paired association. For instance, for the model showed below<br />
<br />
<b> </b><span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">HierarchyRoot</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public class</span> <span style="color: #45818e;">Order</span> : <span style="color: #45818e;">Entity</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">Field</span>, <span style="color: #45818e;">Key</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public long</span> Id { <span style="color: blue;">get</span>; <span style="color: blue;">private set</span>; }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">Field</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public</span> <span style="color: #45818e;">EntitySet</span><<span style="color: #45818e;">OrderItem</span>> Items { <span style="color: blue;">get</span>; <span style="color: blue;">private set</span>; }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #6aa84f;">// some other fields</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public</span> Order(<span style="color: #45818e;">Session</span> session) </b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> : <span style="color: blue;">base</span>(session)</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> {}</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">HierarchyRoot</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public class</span> <span style="color: #45818e;">OrderItem</span> : <span style="color: #45818e;">Entity</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">Field</span>, <span style="color: #45818e;">Key</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public long</span> Id { <span style="color: blue;">get</span>; <span style="color: blue;">private set</span>; }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">Field</span>]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> [<span style="color: #45818e;">Association</span>(PairTo = <span style="color: #cc0000;">"Items"</span>)]</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public</span> <span style="color: #45818e;">Order</span> Order { <span style="color: blue;">get</span>; <span style="color: blue;">set</span>; }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: #38761d;">//some other fields</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">public</span> OrderItem(<span style="color: #45818e;">Session</span> session)</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> : <span style="color: blue;">base</span>(session)</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> {}</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<br />
Order.Items and OrderItem.Order fields will remain in synchronized state. That cause modification of Items collection and if such thing happens during the collection enumeration an exception will show up. The code below is a great illustration.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> domain = <span style="color: #45818e;">Domain</span>.Build(GetDomainConfiguration()) </b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> session = Domain.OpenSession())</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">using</span> (<span style="color: blue;">var</span> transaction = session.OpenTransaction()) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">var</span> order = session.Query.All<<span style="color: #45818e;">Order</span>>().First();</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">var</span> newOrder = <span style="color: blue;">new</span> <span style="color: #45818e;">Order</span>();</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<span style="font-family: Courier New, Courier, monospace;"><b> <span style="color: blue;">foreach</span> (<span style="color: blue;">var</span> orderItem <span style="color: blue;">in</span> order.Items) {</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> </b></span><b style="font-family: "Courier New", Courier, monospace;"><span style="color: #38761d;">// remove the orderItem from the Items collection</span></b><br />
<b style="font-family: "Courier New", Courier, monospace;"> orderItem.Order = newOrder; </b><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b> }</b></span><br />
<br />
On the first iteration orderItem entity becomes removed from order.Items collection and added to newOrder.Items collection by setting orderItem.Order field. On the second iteration enumerator will detect the order.Items collection is changed and throw an exception.<br />
<br />
So now EntitySet enumeration works as it is supposed to and causes no exception unless the collection has been changed by user.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com88tag:blogger.com,1999:blog-3955624781368590602.post-71178252127794033172018-01-16T12:21:00.001+05:002018-01-16T12:21:31.198+05:00Winter sale<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5CUXQ5h7qKtNVh574lpBlMEdXhd3Dn77GtMptVmy03FyvYVD1xPl9RS77lrQnCXOfNGUmv1vpM2dIWa4zJUhotboAk_etlJLboV-9r-3D2GpdtybEHa1_9AQ78SIGD6cpc0WRbiQMbdc/s1600/do-discount-prices.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="142" data-original-width="775" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5CUXQ5h7qKtNVh574lpBlMEdXhd3Dn77GtMptVmy03FyvYVD1xPl9RS77lrQnCXOfNGUmv1vpM2dIWa4zJUhotboAk_etlJLboV-9r-3D2GpdtybEHa1_9AQ78SIGD6cpc0WRbiQMbdc/s640/do-discount-prices.png" width="640" /></a></div>
<br />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">This year we're starting our winter sale right on January 16. Just use the coupon code </span><b style="background-color: white; color: #204063; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px;">DO2018</b><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"> on checkout and get 50% off all editions of </span><a href="http://dataobjects.net/prices.aspx" style="background-color: white; color: #4386ce; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px; font-weight: bold;">DataObjects.Net</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">. If you want to renew your subscription use </span><b style="background-color: white; color: #204063; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px;">DO2018RENEWAL </b><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">to get 70% discount. </span><br />
<br style="background-color: white; color: #204063; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px;" />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">This special on our products is valid until </span><b style="background-color: white; color: #204063; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px;">Wednesday 31 January 2018</b><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">.</span><br />
<br style="background-color: white; color: #204063; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px;" />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">Should you have any questions, please email to </span><a href="mailto:sales@x-tensive.com" style="background-color: white; color: #4386ce; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px; font-weight: bold;">sales@dataobjects.net</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">.</span></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com109tag:blogger.com,1999:blog-3955624781368590602.post-37491015561330040312018-01-15T17:23:00.001+05:002018-01-15T17:23:31.887+05:00DataObjects.Net 5.0.17 Beta 1 and 5.0.17 Beta 2<div dir="ltr" style="text-align: left;" trbidi="on">
We've released two beta releases recently and here are the featured changes<br />
<h4 style="text-align: left;">
5.0.17 Beta 1:</h4>
[main] Decreased amount of metadata extracted while building Domain or Storage node in DomainUpgradeMode.Skip mode.<br />
<br />
<h4 style="text-align: left;">
5.0.17 Beta 2 :</h4>
[main] Added sharing of storage schema across Storage nodes<br />
<br />
<br />
You can read details of the changes inside. And as always you can install the releases from <a href="https://www.nuget.org/profiles/xtensive" target="_blank">Nuget library</a> or download from <a href="http://get.dataobjects.net/Download" target="_blank">our website</a>.<br />
<br />
<br />
<a name='more'></a><h3 style="text-align: left;">
Less queries for DataObjects.Net metadata extraction.</h3>
<br />
Domains built in DomainUpgradeMode.Skip mode supposes storage to be upgraded to actual state so there won't be any difference in expected and actual schemas.<br />
<br />
In this case, certain DataObjects.Net metadata has no effect during domain building process so we have optimized it by excluding such metadata from extraction. That helped to perform less queries.<br />
<h3 style="text-align: left;">
Sharing of storage schema between Storage nodes</h3>
This feature allows to decrease memory utilization when multiple Storage nodes are used. With this option on, DataObjects.Net uses the storage schema of the first node for all additional nodes and dynamically resolves actual database name and schema name for each query on translation.<br />
<br />
With this option off, DataObjects.Net continues using isolated storage schemas for each Storage node and this is default behavior, sharing of storage schema should be turned on manually like<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><span style="color: blue;">var</span> domainConfiguration = DomainConfiguration.Load();</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ...</span><br />
<span style="font-family: Courier New, Courier, monospace;"> domainConfiguration.ShareStorageSchemaOverNodes = <span style="color: blue;">true</span>;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ...</span><br />
<br />
For regular Domains with only default Storage node the feature has no effect but for Domains with multiple Storage nodes it can reduce memory expenses.</div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com146tag:blogger.com,1999:blog-3955624781368590602.post-70191251904607251252017-12-01T14:21:00.000+05:002017-12-01T14:21:42.607+05:00DataObjects.Net 5.0.16<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">We've released a new version recently. Here are the changes we have made:</span></div>
<div style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div style="background-color: white; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 18px; margin-bottom: 9px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: #cccccc; color: #204063;">[main]</span><span style="color: #204063;"> </span><span style="color: #073763;">Fixed null reference exception which might appear on constraints validation</span></span></div>
<div style="background-color: white; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 18px; margin-bottom: 9px;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #073763;"><br /></span></span></div>
<div style="background-color: white; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 18px; margin-bottom: 9px;">
<span style="color: #204063; font-size: 14.95px;">As usual you can download it from </span><a href="http://get.dataobjects.net/Download" style="color: #4386ce; font-size: 14.95px; font-weight: bold;">our official website</a><span style="color: #204063; font-size: 14.95px;"> or install it from </span><a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.11-RC" style="color: #4386ce; font-size: 14.95px; font-weight: bold;">Nuget library</a></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
</div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com213tag:blogger.com,1999:blog-3955624781368590602.post-16599780107712557172017-10-06T14:55:00.001+05:002017-10-06T16:24:46.368+05:00DataObjects.Net 5.0.16 Beta 1<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="background-color: white; color: #204063; font-family: "arial" , "helvetica" , sans-serif;">We've released a new version recently. Here are the changes we have made:</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: white; color: #204063;"><br /></span>
</span></div>
<div style="line-height: 18px; margin-bottom: 9px; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #204063;"><span style="background-color: #cccccc;">[main]</span><span style="background-color: white;"> </span></span><span style="background-color: white; color: #073763;">Added constraint option allowing to skip the constraint if the field isn't changed</span></span></div>
<div style="line-height: 18px; margin-bottom: 9px; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: #cccccc; color: #204063;">[main]</span><span style="background-color: white; color: #204063;"> </span><span style="background-color: white; color: #204063;">DifferentialTuple.Merge() operation no longer causes StackOverflow exception</span></span></div>
<div style="line-height: 18px; margin-bottom: 9px; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: #cccccc; color: #204063;">[main]</span><span style="background-color: white; color: #204063;"> </span><span style="background-color: white; color: #204063;">Fixed certain cases of foreign key absence for reference fields of structures</span></span></div>
<div style="color: #204063; line-height: 18px; margin-bottom: 9px; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: #cccccc;">[main]</span><span style="background-color: white;"> Fixed translation of enum value as default field value</span></span></div>
<div style="color: #204063; line-height: 18px; margin-bottom: 9px; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: #cccccc;">[sqlserver]</span><span style="background-color: white;"> Fixed extraction of information about indexes from database</span></span></div>
<br />
As usual you can download it from <a href="http://get.dataobjects.net/Download">our official website</a> or install it from <a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.11-RC">Nuget library</a><br />
<br />
Complete changes description is below.<br />
<div style="line-height: 18px; margin-bottom: 9px;">
<div style="background-color: white; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #204063; font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<a name='more'></a><h3 style="text-align: left;">
<span style="font-weight: normal;">New PropertyValidator option</span></h3>
We have added a new property called ValidateOnlyIfModified for the field constraints. The property as you have probably guessed allows to skip certain constraints on validation if field value wasn't changed. For example,</div>
<div style="background-color: white; line-height: 18px; margin-bottom: 9px;">
<br /></div>
<div>
<b><span style="font-family: "courier new" , "courier" , monospace;"> [<span style="color: #45818e;">HierarchyRoot</span>]</span></b></div>
<b><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: blue;"> public class</span> <span style="color: #45818e;">User</span> : <span style="color: #45818e;">Entity</span><br /> {<br /> [<span style="color: #45818e;">Field</span>, <span style="color: #45818e;">Key</span>]<br /> <span style="color: blue;">public int</span> Id { <span style="color: blue;">get</span>; <span style="color: blue;">private set</span>; }<br /><br /> [<span style="color: #45818e;">Field</span>(Length = 70)]</span></b><br />
<div>
<b><span style="font-family: "courier new" , "courier" , monospace;"> <span style="color: #274e13;">// this constraint will validate field value</span></span></b></div>
<div>
<b><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #274e13;"> // even if it is still</span><br /> [<span style="color: #45818e;">NotNullOrEmptyConstraint</span>]<br /> <span style="color: blue;">public string</span> FirstName { <span style="color: blue;">get</span>; <span style="color: blue;">set</span>; }<br /><br /> [<span style="color: #45818e;">Field</span>(Length = 70)]</span></b></div>
<div>
<b><span style="font-family: "courier new" , "courier" , monospace;"> <span style="color: #274e13;">// this constraint will validate field value</span></span></b></div>
<div>
<b><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #274e13;"> // only the value is changed</span><br /> [<span style="color: #45818e;">NotNullOrEmptyConstraint</span>(ValidateOnlyIfModified = <span style="color: blue;">true</span>)]<br /> <span style="color: blue;">public string</span> LastName { <span style="color: blue;">get</span>; <span style="color: blue;">set</span>; }</span></b><br />
<b><span style="font-family: "courier new" , "courier" , monospace;"> </span></b><br />
<b><span style="font-family: "courier new" , "courier" , monospace;"> [<span style="color: #45818e;">Field</span>(Length = 70, Nullable = <span style="color: blue;">true</span>)]</span></b><br />
<b><span style="font-family: "courier new" , "courier" , monospace;"> <span style="color: blue;">public string</span> HiddenComment { <span style="color: blue;">get</span>; <span style="color: blue;">set</span>;}</span></b><br />
<b><span style="font-family: "courier new" , "courier" , monospace;"> }</span></b><br />
<br />
Now lets see how it works. Say, we want to add some comment to a user so we query the User entity and edit the HiddenComment field, the field without any validators, and don't change the rest of the fields like that:<br />
<br />
<div style="line-height: 18px; margin-bottom: 9px;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> using</span><span style="color: #333333;"> (</span><span style="color: blue;">var</span><span style="color: #333333;"> session = domain.OpenSession())</span></b></span><br />
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> using</span><span style="color: #333333;"> (</span><span style="color: blue;">var</span><span style="color: #333333;"> tx = session.OpenTransaction()) {</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: blue;">var</span><span style="color: #333333;"> johnUser = session.Query.All<</span><span style="color: #45818e;">User</span><span style="color: #333333;">>()</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> .First(u => u.FirstName==</span><span style="color: #660000;">"John"</span><span style="color: #333333;">);</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> johnUser.HiddenComment = </span><span style="color: #660000;">"He is the best"</span><span style="color: #333333;">;</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: #274e13;">// commit leads to validation</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> tx.Complete();</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white; color: #333333;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
In this case, the constraint of the FirstName field will be triggered despite the field hasn't been changed. It is an example of constraints' regular behavior. More interestingly, the constraint of the LastName field will be skipped thanks to the new option.<br />
<br />
Another case. We change the LastName field.<br />
<div style="background-color: white; color: #333333;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #204063; font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> using</span><span style="color: #333333;"> (</span><span style="color: blue;">var</span><span style="color: #333333;"> session = domain.OpenSession())</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> using</span><span style="color: #333333;"> (</span><span style="color: blue;">var</span><span style="color: #333333;"> tx = session.OpenTransaction()) {</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: blue;">var</span><span style="color: #333333;"> johnUser = session.Query.All<</span><span style="color: #45818e;">User</span><span style="color: #333333;">>()</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> .First(u => u.FirstName==</span><span style="color: #660000;">"John"</span><span style="color: #333333;">);</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> johnUser.LastName = </span><span style="color: #660000;">"Brown"</span><span style="color: #333333;">;</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: #274e13;">// commit leads to validation</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> tx.Complete();</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<br />
Here, both of the constraints will cause validation of their fields - the first constraint will be triggered because it has to do it every time and the second one - because the field value has been modified.<br />
<br />
Need to say, an attempt to change the field value is more important than an actual value which was set for the field. Check the example below<br />
<div style="background-color: white; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 13px;">
<br /></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> using</span><span style="color: #333333;"> (</span><span style="color: blue;">var</span><span style="color: #333333;"> session = domain.OpenSession())</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> using</span><span style="color: #333333;"> (</span><span style="color: blue;">var</span><span style="color: #333333;"> tx = session.OpenTransaction()) {</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: blue;">var</span><span style="color: #333333;"> johnUser = session.Query.All<</span><span style="color: #45818e;">User</span><span style="color: #333333;">>()</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> .First(u => u.FirstName==</span><span style="color: #660000;">"John"</span><span style="color: #333333;"> && u.LastName==</span><span style="color: #660000;">"Brown"</span><span style="color: #333333;">);</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> johnUser.LastName = </span><span style="color: #660000;">"Brown"</span><span style="color: #333333;">;</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: #274e13;">// commit leads to validation</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> tx.Complete();</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white; color: #333333;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
The LastName field value will be validated despite the fact that the new value is actually the same as previous one. It happens because an entity registers for validation on set field value attempt and you should take this particularity into account.<br />
<br />
Summing up all of the above, the new option will be helpful for those who for some reason don't want to validate untouched fields. Another possible case is when you are import some rows to DataObjects.net database and you are not completely sure the data is valid, with help of this option you will softly migrate data to valid state.<br />
<div style="background-color: white; color: #333333;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">StackOverflowException on persist operation</span></h3>
Some of our customers faced with the exception, trying to save changes to storage. The error showed up on DifferentialTuple.Merge() operation. So if you have similar symptoms this may be your case. From this version the problem is fixed.<br />
<br />
<h3 style="text-align: left;">
<span style="font-weight: normal;">Foreign key absence for reference fields of structures</span></h3>
In cases like below<br />
<div style="background-color: white; color: #333333;">
<br /></div>
<div style="background-color: white;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #333333;"> </span><b><span style="color: #333333;">[</span><span style="color: #45818e;">HierarchyRoot</span><span style="color: #333333;">]</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: blue;"> public class</span><span style="color: #333333;"> </span><span style="color: #45818e;">InvoiceItem</span><span style="color: #333333;"> : </span><span style="color: #45818e;">Entity</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> {</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> [</span><span style="color: #45818e;">Field</span><span style="color: #333333;">]</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: blue;">public long</span><span style="color: #333333;"> Id { </span><span style="color: blue;">get</span><span style="color: #333333;">; </span><span style="color: blue;">private set</span><span style="color: #333333;">; }</span></b></span></div>
<div style="background-color: white;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> [</span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Field</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">]</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: blue;">public</span><span style="color: #333333;"> </span><span style="color: #45818e;">Product</span><span style="color: #333333;"> Product { </span><span style="color: blue;">get</span><span style="color: #333333;">; </span><span style="color: blue;">set</span><span style="color: #333333;">; }</span></b></span></div>
<div style="background-color: white;">
<span style="font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> [</span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Field</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">]</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: #274e13;">// this field is important</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> </span><span style="color: blue;">public</span><span style="color: #333333;"> </span><span style="color: #45818e;">ExtendedQuantity</span><span style="color: #333333;"> Quantity { </span><span style="color: blue;">get</span><span style="color: #333333;">; </span><span style="color: blue;">set</span><span style="color: #333333;">; }</span></b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> <b>[HierarchyRoot]</b></span></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public class</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Measure</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> : </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Entity</span></b></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> {</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> [</span><span style="color: #45818e;">Field</span><span style="color: #333333;">]</span></b></span></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public int</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> Id { </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">get</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">private set</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; }</span></b></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> [</span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Field</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">]</span></b></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public string</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> Name { </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">get</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">set</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; }</span></b></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><b><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public class</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">ExtendedQuantity</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> : </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Quantity</span></b></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> {</b></span></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #274e13; font-family: "courier new" , "courier" , monospace;">//some other fields</span></b></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><b><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public class</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Quantity</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> : </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Structure</span></b></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> {</b></span></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><span style="color: #333333;"> [</span><span style="color: #45818e;">Field</span><span style="color: #333333;">]</span></b></span></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public double</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> Vaule { </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">get</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">set</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; }</span></b></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> [</span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Field</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">]</span></b></div>
<div style="background-color: white;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Measure</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> Measure { </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">get</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">set</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; }</span></b></div>
<div style="background-color: white;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white; color: #333333;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
the association between the InvoiceItem type and Measure type used to be skipped and it led to absence of foreign key in database. Such behavior was incorrect so we've fixed it and since this version such foreign keys will be built correctly.<br />
<div style="background-color: white;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">Enum field default value translation</span></h3>
There were cases when FieldAttrubute.DefaultValue for inherited fields of enum type translated incorrectly. For example:<br />
<div style="background-color: white;">
<span style="color: #333333; font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</div>
<div style="text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace; font-weight: bold;">public enum</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace; font-weight: bold;"> </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace; font-weight: bold;">ProductStage</span></div>
<div style="text-align: left;">
<b style="background-color: white; color: #333333; font-family: "Courier New", Courier, monospace;"> {</b></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> //Some stages</b></span></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div style="background-color: white; text-align: left;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> [</span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">HierarchyRoot</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">]</span></b></div>
<div style="background-color: white; text-align: left;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public class</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Product</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> : </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Entity</span></b></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> {</b></span></div>
<div style="background-color: white; text-align: left;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> [</span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Key</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">, </span><span style="color: #45818e; font-family: "courier new" , "courier" , monospace;">Field</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">]</span></b></div>
<div style="background-color: white; text-align: left;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public long</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> Id { </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">get</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">private set</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; }</span></b></div>
<div style="background-color: white; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #333333; font-family: "arial" , "helvetica" , sans-serif;"><b> </b></span></span></div>
<div style="background-color: white; text-align: left;">
<b><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #333333; font-family: "arial" , "helvetica" , sans-serif;"> </span></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">[</span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #45818e;">Field</span></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">(DefaultValue = </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #45818e;">OneTwo</span></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">.One)]</span></b></div>
<div style="background-color: white; text-align: left;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">public</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span></b><span style="color: #45818e; font-family: "courier new" , "courier" , monospace; font-weight: bold;">ProductStage </span><b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">Stage { </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">get</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; </span><span style="color: blue; font-family: "courier new" , "courier" , monospace;">set</span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;">; }</span></b></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b><br /></b></span></div>
<div style="background-color: white; text-align: left;">
<b><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: blue;">public class</span></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #45818e;">FinalProduct</span></span><span style="color: #333333; font-family: "courier new" , "courier" , monospace;"> : </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #45818e;">Product</span></span></b></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> {</b></span></div>
<div style="background-color: white; text-align: left;">
<span style="color: #333333; font-family: "courier new" , "courier" , monospace;"><b> }</b></span></div>
<br />
<br />
There is no longer a problem with default value translation.<br />
<br />
<h3 style="text-align: left;">
<span style="font-weight: normal;">Index related information extraction for MS SQL Server</span></h3>
<br />
There was a possibility of an error on schema extraction as DataObjects.Net tried to extract indexes which are not supported. The problem could show up in SQL Server beginning from 2014 version. We forced unsupported indexes to be skipped on extraction. If you have some unsupported indexes e.g. ColumnsStore indexes, they will be skipped so you should control them by yourself.</div>
</div>
<div style="line-height: 18px; margin-bottom: 9px;">
<br /></div>
<div style="line-height: 18px; margin-bottom: 9px;">
<br /></div>
</div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com30tag:blogger.com,1999:blog-3955624781368590602.post-64840087425222525152017-06-19T15:45:00.000+05:002017-06-19T15:45:42.946+05:00DataObjects.Net 5.0.14<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">We've released a new final version recently. Here are the changes we have made:</span><br />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"><br /></span>
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #999999;">[main]</span> Returned expected behavior of delayed queries which was changed in 5.0.11 by bug fix for IN() operation.</span></span><br />
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><br /></span></span>
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;">In 5.0.11 we had made some changes and fixed certain cases of IN() operation usage which supposed to create temporary table, but didn't. These changes brought unexpected behavior for delayed queries. In this release we kept the cases fixed and returned old behavior for delayed queries.</span></span><br />
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><br /></span></span>
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #999999;">[main]</span> Fixed bug when Server profile sessions allowed to query database without transaction.</span></span><br />
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><br /></span></span>
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><b>IMPORTANT!</b> This bug fix might be a breaking change for those users who already use it. Officially, SessonOptions.ServerProfile option does not allow queries outside of transaction. So we have returned this behavior. If you require such non-transactional queries, you should include an additional option to your session configuration - SessionsOptions.NonTransactionalReads.</span></span><br />
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><br /></span></span>
<span style="color: #204063; font-family: arial, verdana, helvetica, sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #999999;">[mysql]</span> Corrected column types' extraction.</span></span><br />
<br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><br /></span></span><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">As usual you can download it from </span><a href="http://get.dataobjects.net/Download" style="background-color: white; color: #4386ce; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px; font-weight: bold;" target="_blank">our official website</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"> or install it from </span><a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.11-RC" style="background-color: white; color: #4386ce; font-family: arial, verdana, helvetica, sans-serif; font-size: 14.95px; font-weight: bold;" target="_blank">Nuget library</a></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com12tag:blogger.com,1999:blog-3955624781368590602.post-70685545068082487192017-01-31T17:37:00.000+05:002017-01-31T17:37:30.076+05:00DataObjects.Net 5.0.11<div dir="ltr" style="text-align: left;" trbidi="on">
We've released a new final version recently.<br />
<br />
We performed following changes:<br />
<br />
<span style="background-color: #cccccc;">[main]</span> Constraints can be skipped on transaction commit<br />
<span style="background-color: #cccccc;">[main]</span> Operations like EntitySet<T>.ToList() no longer lead to incorrect EntitySet<T>.Count value<br />
<span style="background-color: #cccccc;">[main]</span> IN() operation now creates temporary tables when it supposes to<br />
<span style="background-color: #cccccc;">[main]</span> Fixed translations of aggregates like IQueryable<T>.Sum() when selector parameter can be omitted<br />
<span style="background-color: #cccccc;">[main]</span> Enum constants in IndexAttribute.Filter expression are translated correctly now<br />
<span style="background-color: #cccccc;">[main]</span> Fixed certain scenarios when enum constants caused query translation error<br />
<br />
<br />
<br />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">As usual you can download it from </span><a href="http://get.dataobjects.net/Download" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold;" target="_blank">our official website</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"> or install it from </span><a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.11-RC" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold;" target="_blank">Nuget library</a><br />
<br /></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com18tag:blogger.com,1999:blog-3955624781368590602.post-11890832011173830222016-12-26T15:59:00.000+05:002016-12-26T15:59:06.445+05:00Winter sale<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicQJuTOkfBgtXVUwEHNlk65BQR1aSsoymaVjZOO47HyW6HJa_GHUtmmvFdWeQ9Q8L-0NudrA-0A8tnczWYYUBXy0H_m_UZphwAxBS3ZSnO4IaTwB3P-6aLthlTT9vHei7S4fJ-Kq5XSAM/s1600/do-discount-prices_do.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicQJuTOkfBgtXVUwEHNlk65BQR1aSsoymaVjZOO47HyW6HJa_GHUtmmvFdWeQ9Q8L-0NudrA-0A8tnczWYYUBXy0H_m_UZphwAxBS3ZSnO4IaTwB3P-6aLthlTT9vHei7S4fJ-Kq5XSAM/s640/do-discount-prices_do.png" width="640" /></a></div>
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"><br /></span>
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">This year we're starting our winter sale right on December 27. Just use the coupon code </span><b style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;">DO2017</b><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"> on checkout and get 50% off all editions of </span><a href="http://dataobjects.net/prices.aspx" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold;">DataObjects.Net</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">. If you want to renew your subscription use </span><b style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;">DO2017RENEWAL </b><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">to get 70% discount. </span><br />
<br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;" />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">This special on our products is valid until </span><b style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;">Wednesday 15 January 2017</b><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">.</span><br />
<br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;" />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">Should you have any questions, please email to </span><a href="mailto:sales@x-tensive.com" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold;">sales@x-tensive.com</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">.</span></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com32tag:blogger.com,1999:blog-3955624781368590602.post-77343364477479518552016-12-23T16:02:00.000+05:002016-12-23T16:02:08.496+05:00DataObjects.Net 5.0.11 RC2<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">We released DataObjects.Net 5.0.11 RC2 last Friday. The list of changes is below:</span><br />
<br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> Fixed build in Perform/PerformSafely modes when there is no Metadata tables in database/schema</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> Added support for CONTAINSTABLE queries for SQL Server providers</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> Optimized memory usage for storage nodes which are build in Skip mode</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> Full-text indexes are now allowed for fields of structures</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> Added highest ranked matches limitation support for free-text queries</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> ReferenceFinder now excludes references which were locally removed</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[main]</span> Fixes certains scenarios when changes do not clear on after persist</span></span><br />
<span style="color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif;"><span style="font-size: 14.95px;"><span style="background-color: #cccccc;">[postgresql]</span> Fixed extraction of columns associated with DateTimeOffset fields</span></span><br />
<br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;" />
<br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px;" />
<span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;">As usual you can download it from </span><a href="http://get.dataobjects.net/Download" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold;" target="_blank">our official website</a><span style="background-color: white; color: #204063; font-family: "arial" , "verdana" , "helvetica" , sans-serif; font-size: 14.95px;"> or install it from </span><a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.11-RC" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold;" target="_blank">Nuget library</a></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com31tag:blogger.com,1999:blog-3955624781368590602.post-90002571596514340452016-09-22T18:15:00.000+05:002016-09-22T18:15:48.941+05:00Support for DateTimeOffset for PostgreSQL provider<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="tr_bq">
<br /></div>
<div class="tr_bq">
We have introduced DateTimeOffset support for PostgreSQL provider in 5.0.11 RC. Here, we want to explain some restrictions of this RDBMS which affect our implementation of that type support.</div>
<div class="tr_bq">
<br /></div>
<div class="tr_bq">
We <b>warn</b> you that support for date/time with time zone is different from Oracle Database and Microsoft SQL Server implementations. The last two RDBMS has full support for all parts of date/time including time zone, but PostgreSQL doesn't.<br />
<br /></div>
<div class="tr_bq">
If you want to use DateTimeOffset type in domain models on PostgreSQL storage we need to explain some things you may face with.<br />
<a name='more'></a></div>
<div class="tr_bq">
<br /></div>
<div class="tr_bq">
PostgreSQL has two types which can store both date and time - <i>timestamp</i> (timestamp without time zone) and <i>timestamptz</i> (timestamp with time zone). You may glance at them and think that everything is OK and you can store date/time with time zone in the last one. BUT, if you look carefully you will notice that values of both <i>timestamp</i> and <i>timestamptz</i> types have same size - 8 bytes. Strange, right?</div>
<div class="tr_bq">
<br /></div>
<div class="tr_bq">
Here is the quote from PostgreSQL documentation:</div>
<blockquote class="tr_bq">
<i>"All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the <a href="https://www.postgresql.org/docs/9.5/static/runtime-config-client.html#GUC-TIMEZONE">TimeZone</a> configuration parameter before being displayed to the client."</i></blockquote>
That means PostgreSQL does not store time zone part of given value at all. It will return you results in the time zone which was specified in PostgreSQL configuration file or the zone which was set manually for certain connection.<br />
<br />
For instance, RDBMS instance was configured for time zone UTC+07. You insert value '2016-09-10 18:19:22.000 +02:00' to some timestamptz column and query it back. The storage will return you '2016-09-10 23:19:22.000 +07:00' and it will do it all the time until you change server time zone.<br />
<br />
Such odd implementation of timestamptz influences the results of queries you will receive using DataObjects.Net.<br />
<br />
It will influence on date and time parts extraction. You will receive them for a timestamp value in server time zone. It is really important for such parts as Day, Hour, Minute, TimeOfDate and others which may be changed by switching time zone. Also you will get same offset for all DateTimeOffset values.<br />
<br />
You also cannot use in LINQ queries methods like<br />
<br />
- DateTimeOffset.ToOffset(TimeStamp offset);<br />
- DateTimeOffset.ToLocalTime();<br />
- DateTimeOffset.ToUniversalTime().<br />
<br />
The reason is in another PostgreSQL restriction. It provides you a functionality of switching time zone for timestamp values by using <i>AT TIME ZONE</i> statement or its equivalent - function <i>timezone(zone, timestamp).</i> <a href="https://www.postgresql.org/docs/9.1/static/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT-TABLE" target="_blank">This table</a> describes variants of how it can be used. Note that, if you move a <i>timestamptz</i> value to certain time zone you will get a value <b>without time zone</b> . It makes it impossible to implement support for the methods I mentioned.<br />
<br />
However, such type members like DateTimeOffset.LocalDateTime and DateTimeOffset.UtcDateTime will work, because they return values of DateTime type and such operations can be performed by AT TIME ZONE statement and these members are usable in queries.<br />
<br />
<br />
These restrictions and particularities should be taken into account if you decide to use DateTimeOffset type in a domain model built on PostgreSQL storage. We would recommend you to set time zone in postgresql.config file or with SET statement for connection. It will prevent you from getting values with unexpected offsets. Also you will have to perform switching to time zones you need on client side.<br />
<br />
We hope this text will help you avoid mistakes.</div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com11tag:blogger.com,1999:blog-3955624781368590602.post-80099038406197302802016-09-22T17:09:00.000+05:002016-09-22T17:09:05.581+05:00DataObjects.Net 5.0.11 RC<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
We released DataObjects.Net 5.0.11 RC this Wednesday. The list of changes is below:<br />
<br />
<span style="background-color: #cccccc;">[main]</span> Full-text indexes no longer cause domain building error in DomainUpgradeMode.Skip mode<br />
<span style="background-color: #cccccc;">[main]</span> Fixed temporary keys remap which showed up in previous version<br />
<span style="background-color: #cccccc;">[postgresql]</span> Updated version of client library<br />
<span style="background-color: #cccccc;">[postgresql]</span> Added support for DateTimeOffset<br />
<br />
<br />
As usual you can download it from <a href="http://get.dataobjects.net/Download" target="_blank">our official website</a> or install it from <a href="https://www.nuget.org/packages/Xtensive.Orm/5.0.11-RC" target="_blank">Nuget library</a></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com3tag:blogger.com,1999:blog-3955624781368590602.post-73114072003766370912016-08-05T17:59:00.002+05:002016-08-05T17:59:44.702+05:00DataObjects.Net 5.0.10<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">We've just released DataObjects.Net 5.0.10 Final. It contains several changes, such as:</span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> </span><span style="background-color: #cccccc; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">[main]</span><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> </span><span style="color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif;"><span style="font-size: 14.95px; line-height: 20.93px;">Remap of temporary to real keys, no longer restore nulled references to an Entity</span></span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> </span><span style="background-color: #cccccc; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">[main]</span><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> </span><span style="color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif;"><span style="font-size: 14.95px; line-height: 20.93px;">Fixed certain cases of session cache returning null for a valid key</span></span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> </span><span style="background-color: #cccccc; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">[main]</span><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> </span><span style="color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif;"><span style="font-size: 14.95px; line-height: 20.93px;">Fixed certain cases when EntitySet could return nulls instead of removed Entities on enumeration</span></span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">As usual, you may get it </span><a href="http://get.dataobjects.net/Download" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold; line-height: 20.93px;" target="_blank">from our website</a><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;"> or </span><a href="https://www.nuget.org/packages/Xtensive.Orm" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold; line-height: 20.93px;" target="_blank">from Nuget library</a><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">.</span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white;"><span style="color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif;"><span style="font-size: 14.95px; line-height: 20.93px;">Also, we have several changes planned for the next version.We have scheduled to fix the following list of issues:</span></span></span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">- Incorrect translation of IndexAttribute.Filter underlying expression when it contains enum values;</span><br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;">- Usage of our In() extension in queries does not create temporary table when it supposes to;</span><br />
<span style="color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif;"><span style="background-color: white;"><span style="font-size: 14.95px; line-height: 20.93px;">- Exception on translation of IQueryable<>.Sum() when selector can be easily omitted.</span></span></span><br />
<br style="background-color: white; color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; line-height: 20.93px;" /><span style="background-color: white;"><span style="color: #204063; font-family: Arial, Verdana, Helvetica, sans-serif;"><span style="font-size: 14.95px; line-height: 20.93px;">*Current list of changes planned for the next release is not final and may be appended by additional issues or improvements, up-to-date list is available on </span></span></span><a href="http://dataobjects.net/roadmap.aspx" style="background-color: white; color: #4386ce; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 14.95px; font-weight: bold; line-height: 20.93px;" target="_blank">DataObjects.Net website</a></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com5tag:blogger.com,1999:blog-3955624781368590602.post-78340565338403624782016-06-30T18:42:00.000+05:002016-06-30T21:05:36.237+05:00 DataObjects.Net 5.0.10 RC<div dir="ltr" style="text-align: left;" trbidi="on">
We've just released DataObjects.Net 5.0.10 RC. It contains several changes, such as :<br />
<br />
<span style="background-color: #cccccc;">[main]</span> Cross-hierarchical persistent type movements are unsafe actions now<br />
<span style="background-color: #cccccc;">[main]</span> Added Support for Domain building on read-only database in UpgradeMode.Skip mode<br />
<span style="background-color: #cccccc;">[main]</span> Fixed incorrect translation of persistent interface queries occured in some scenarious<br />
<span style="background-color: #cccccc;">[main]</span> Fixed certain cases of storage node metadata corruption<br />
<span style="background-color: #cccccc;">[main]</span> Improved unsaved reference registration<br />
<span style="background-color: #cccccc;">[sqlite]</span> Added Support for DateTimeOffset fields and basic operations with them<br />
<span style="background-color: #cccccc;">[oracle]</span> Corrected extraction of DateTimeOffset columns<br />
<span style="background-color: #cccccc;">[weaver]</span> Fixed pdb-files handling created by Roslyn<br />
<br />
Note that:<br />
- DataObjects.Net does not currently control changes of entities when domain is built on read-only storage, it is managed by the storage side instead. DataObjects.Net layer entity changes control is among our current tasks.<br />
- Some operations with DateTimeOffset fields are not currently supported as they are not supported by SQLite.<br />
<br />
As usual, you may get it <a href="http://get.dataobjects.net/Download" target="_blank">from our website</a> or <a href="https://www.nuget.org/packages/Xtensive.Orm" target="_blank">from Nuget library</a>.<br />
<br />
Also, we have serveral changes planned for the next version. Currently the list contains such issues as:<br />
<br />
- EntitySet is full of nulls after passing it as parameter to Session.Remove(IEnumerable);<br />
- Unexpected prefetch behavior with Session cache in certain sittuations.<br />
<br />
*Current list of changes planned for the next release is not final and may be appended by additional issues or improvements, up-to-date list is avaliable on <a href="http://dataobjects.net/roadmap.aspx" target="_blank">DataObjects.Net website</a></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com3tag:blogger.com,1999:blog-3955624781368590602.post-3810409112473782502016-02-15T17:03:00.001+05:002016-02-15T17:03:26.379+05:00DataObjects.Net 5.0.8<div dir="ltr" style="text-align: left;" trbidi="on">
We've just released DataObjects.Net 5.0.8. It contains several changes, such as :<br />
<br />
[main] Fixed translation of EnumerableExtensions.IsNullOrEmpty();<br />
[main] Fixed Domain building on empty database/schema;<br />
[main] Fixed incorrect translation of POCO constructors in some cases.<br />
<br />
<br />
As usual, you may download it from <a href="http://get.dataobjects.net/Download" target="_blank">download page</a> on our website or from <a href="https://www.nuget.org/packages/Xtensive.Orm" target="_blank">Nuget library</a>.<br />
<br /></div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com1tag:blogger.com,1999:blog-3955624781368590602.post-3544295348702051422014-09-16T12:08:00.001+06:002014-09-16T21:10:48.621+06:00DataObjects.Net 5.0.2<div dir="ltr" style="text-align: left;" trbidi="on">
We've already released DataObjects.Net 5.0.2 which containst several fixes. All changes are described bellow.<br />
<h4 style="text-align: left;">
Changes in DataObjects.Net 5.0.2:</h4>
<div style="text-align: left;">
<span style="background-color: #eeeeee;">[main]</span> Association between Key fields no longer creates an additional index<br />
<span style="background-color: #eeeeee;">[main]</span> Fixed: DataObjects.Net puts type identifier into the wrong column<br />
<span style="background-color: #eeeeee;">[main]</span> Fixed: incorrect left join behavior<br />
<span style="background-color: #eeeeee;">[main]</span> Fixed: PhoneNumberConstraint validator cloning<br />
<span style="background-color: #eeeeee;">[mysql]</span> Fixed: wrong SQL for multiple join statement.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Just as always you can get it from <a href="http://get.dataobjects.net/Download" target="_blank">our site</a> or <a href="http://www.nuget.org/profiles/xtensive" target="_blank">NuGet gallery</a>.</div>
</div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com20tag:blogger.com,1999:blog-3955624781368590602.post-43828020717966297022014-09-09T12:51:00.000+06:002014-09-10T22:02:22.492+06:00We are back to blogging<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal">
<span lang="EN-US">Hello everyone. First of all, we apologize for the noticeable silence in our blog. We are back online now and want to share some exciting news with you. <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"><br />
</span></div>
<div class="MsoNormal">
<span lang="EN-US">Last 3-month period was full of significant events: we released two versions of DataObjects.Net 4.6 and two release candidates of DataObjects.Net 5.0. And finally, stable version of DataObjects.Net 5.0 is out. All the changes are described bellow.</span></div>
<h3 style="text-align: left;">
DataObjects.Net 4.6</h3>
<h4 style="text-align: left;">
<span lang="EN-US"><b>Changes in DataObjects.Net 4.6.7:</b></span></h4>
<div class="MsoNormal" style="text-align: left;">
<span style="background-color: #eeeeee;">[main]</span> Added UpgradeHandler.TypesMovementsAutoDetection option</div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Fixed handling of bit operations for long type for a set of providers<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Fixed handling of recycled and recycled nested types<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Fixed handling of queries with multiple IN operations<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Fixed column mapping name handling<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[sqlserver]</span> Fixed dropping of default constraint issue.<o:p></o:p></span></div>
<h4 style="text-align: left;">
<span lang="EN-US">Changes in DataObjects.Net 4.6.8:</span></h4>
<div class="MsoListParagraphCxSpFirst">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Fixed handling of queries with multiple IN operations<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Fixed handling of queries to EntitySet<T> associated with a struct field<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Added map of type identifiers UpgradeContext.UserDefinedTypeMap<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[sqlserver]</span> Fixed translation of OnUpdate and OnDelete actions for foreign keys.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
<h3 style="text-align: left;">
DataObjects.Net 5.0</h3>
<h4 style="text-align: left;">
<span lang="EN-US">DataObjects.Net 5.0 RC:</span></h4>
<div class="MsoListParagraphCxSpFirst">
<span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[main]</span> Fixed incorrect sequence of delete or insert queries in certain scenarios</div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"><span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[main]</span> Extended DelayedQuery API<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<span lang="EN-US"><span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[main]</span> Added support for using dynamically defined fields in LINQ.<o:p></o:p></span></div>
<h4 style="text-align: left;">
DataObjects.Net 5.0 RC2:</h4>
<div class="MsoListParagraphCxSpFirst">
<span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[main]</span> Fixed handling of queries with multiple IN operations</div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"><span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[main]</span> <o:p></o:p></span>Fixed handling of queries to EntitySet<T> associated with a struct field</div>
<div class="MsoListParagraphCxSpMiddle">
<span lang="EN-US"><span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[main]</span> Added map of type identifiers UpgradeContext.UserDefinedTypeMap<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<span style="background-color: white;"> </span><span style="background-color: #eeeeee;">[sqlserver]</span> Fixed translation of OnUpdate and OnDelete actions for foreign keys.</div>
<div class="MsoNormal">
<h4 style="text-align: left;">
<span lang="EN-US">DataObjects.Net 5.0.0:</span></h4>
</div>
<div class="MsoListParagraphCxSpFirst">
<span lang="EN-US"> <span style="background-color: #eeeeee;">[main]</span> Delayed/Future queries no longer improperly cache closure variables values<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<span style="background-color: #eeeeee;">[main]</span> Secondary indexes which includes inherited fields are no longer ignored.</div>
<h3 style="text-align: left;">
<span lang="EN-US"><b>Download</b></span></h3>
<div class="MsoNormal">
<span lang="EN-US">Just as always releases are available on <a href="http://get.dataobjects.net/Download" target="_blank">our site</a> and <a href="http://nuget.org/profiles/xtensive" target="_blank">NuGet gallery</a>.<o:p></o:p></span></div>
</div>
Alexey Kulakovhttp://www.blogger.com/profile/10917167837528458508noreply@blogger.com2tag:blogger.com,1999:blog-3955624781368590602.post-10477949201877360442014-05-28T19:43:00.000+06:002014-05-28T19:43:27.718+06:00DataObjects.Net 5.0.0 Beta 3<div dir="ltr" style="text-align: left;" trbidi="on">
We've just released DataObjects.Net 5.0.0 Beta 3 which brings several improvements over previous Beta 2 release as well as important bug fixes.<br />
<h4 style="text-align: left;">
New features and improvements</h4>
<ul style="text-align: left;">
<li><span>Added FieldAttribute.DefaultSqlExpression property</span></li>
<li>
<span>Added support for multi-node domains</span></li>
<li>
<span>Fully reworked client session profile</span></li>
<li>
<span>Added support for geospatial types for PostgreSQL</span>
</li>
</ul>
<h4 style="text-align: left;">
Fixed bugs</h4>
<div class="modal-body">
<ul style="text-align: left;">
<li><span>Fixed issue with concurrent writing to file log</span></li>
<li>
<span>Fixed issue with weaver command line length truncation</span></li>
<li><span>Fixed handling of bit operations with long values for many providers</span>
</li>
</ul>
Just as always you can use <a href="http://nuget.org/profiles/xtensive">NuGet gallery</a> or <a href="http://get.dataobjects.net/Download">our site</a> to get the latest release.</div>
<div class="modal-body">
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3955624781368590602.post-8785166623550029412014-04-15T13:37:00.000+06:002014-04-15T13:37:10.627+06:00DataObjects.Net 4.6.6<div dir="ltr" style="text-align: left;" trbidi="on">
<h3>
Changes in DataObjects.Net 4.6.6:</h3>
<br />
<tt>[main]</tt> Added DomainConfiguration.MultidatabaseKeys setting<br />
<tt>[main]</tt> Fixed incorrect EntitySet caching in ClientProfile<br />
<tt>[main]</tt> Fixed construction of inherited partial indexes<br />
<tt>[main]</tt> Fixed NRE when using partial indexes over abstract types<br />
<tt>[main]</tt> Fixed incorrect type id upgrade when type is moved to another namespace<br />
<tt>[oracle]</tt> Exclude many standard schemes during extraction<br />
<h3>
Download</h3>
Just as always releases are available at <a href="http://get.dataobjects.net/Download">our site</a> and <a href="http://nuget.org/profiles/xtensive">NuGet gallery</a>.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3955624781368590602.post-13443823815348192842014-03-20T16:25:00.000+06:002014-03-20T16:25:54.284+06:00NonTransactionalReads in DataObjects.Net 5.0<div dir="ltr" style="text-align: left;" trbidi="on">
<tt>NonTransactionalReads</tt> is a specific <tt>Session</tt> option that allows to read once fetched entities right from <tt>Session</tt> cache without the requirement to have an open transaction. This mode might be useful for desktop application that have only one <tt>Session</tt> instance for the entire lifetime of application or for services like auditing, logging, etc. that need to read persistent fields without having any idea of sessions, transactions, etc.
<br />
<br />
To demonstrate the approach, let's start with a sample. Here is the persistent class with one lazy loading field:
<br />
<pre>[HierarchyRoot]
public class Country : Entity
{
[Field, Key]
public int Id { get; private set; }
[Field(Length = 30)]
public string Name { get; set; }
[Field(Length = 3)]
public string Code { get; set; }
[Field(LazyLoad = true)]
public string Description { get; set; }
public Country(Session session)
: base(session) {}
}
</pre>
Say, we want to have a cache of countries in our application. We create some countries on <tt>Domain</tt> start, e.g.:<br />
<br />
<pre>var domainConfiguration = DomainConfiguration.Load("Default");
var domain = Domain.Build(domainConfiguration);
using (var session = domain.OpenSession())
using (var tx = session.OpenTransaction()) {
new Country(session) {
Code = "AND",
Name = "Andorra",
Description = "A tiny country in the middle of Europe"
};
new Country(session) {
Code = "ATA",
Name = "Antarctica",
Description = "Icy paradise for penguins"
};
// other countries...
tx.Complete();
}
</pre>
To implement some sort of cache in earlier version of DataObjects.Net you would load countries in every transaction or avoid frequent loading of persistent objects from database by converting them into some kind of POCO and cache them.
<br />
<br />
In DataObjects.Net 5.0 you can do this in a more comfortable way using the new <tt>NonTransactionalReads</tt> flag.
<br />
<pre>// Configuring session
var options = new SessionConfiguration(SessionOptions.Default<b> | SessionOptions.NonTransactionalReads</b>);
var session = domain.OpenSession(options);
Dictionary<string, Country> cache;
// Loading cache with data in one transaction
using (var tx = session.OpenTransaction()) {
cache = session.Query.All<Country>().ToDictionary(i => i.Code);
tx.Complete();
}
// accessing data from another transaction
using (var tx2 = session.OpenTransaction()) {
// cached objects are not being reloaded from database. they are consumed as is
var antarctica = cache["ATA"];
Console.WriteLine(antarctica.Name);
// accessing a lazy loading field. session loads it on demand
Console.WriteLine(antarctica.Description);
tx2.Complete();
}
// disposing session. Data is not accessible anymore
session.Dispose();
</pre>
<br />
What is more interesting, the same behavior can be achieved without using any transactions at all. Let's re-write the sample:
<br />
<pre>// Configuring session
var options = new SessionConfiguration(SessionOptions.Default<b> | SessionOptions.NonTransactionalReads</b>);
var session = domain.OpenSession(options);
Dictionary<string, Country> cache;
// Loading cache with data without any transaction
cache = session.Query.All<Country>().ToDictionary(i => i.Code);
// accessing data
var antarctica = cache["ATA"];
Console.WriteLine(antarctica.Name);
// accessing a lazy loading field. session loads it on demand
Console.WriteLine(antarctica.Description);
// disposing session. Data is not accessible anymore
session.Dispose();
</pre>
<br />
So, the key points of the <tt>NonTransactionalReads</tt> mode:
<br />
<ol>
<li> No matter how data is loaded from database (with the help of transaction or not), it is accessible from outside the boundaries of the transaction, if any.
</li>
<li> Data is cached on <tt>Session</tt> level. As long as the <tt>Session</tt> is alive (not disposed), the data will be available from its cache.
</li>
<li> In case of accessing <tt>LazyLoad</tt> fields, <tt>Entity</tt> references and <tt>EntitySet</tt>s, data is automatically fetched from database on demand.
</li>
</ol>
</div>
Anonymoushttp://www.blogger.com/profile/07143844311415529548noreply@blogger.com10tag:blogger.com,1999:blog-3955624781368590602.post-19948902552489837372014-03-17T20:28:00.000+06:002014-03-17T20:28:21.934+06:00DataObjects.Net 5.0 meets NLog & log4net<div dir="ltr" style="text-align: left;" trbidi="on">
In the <a href="http://blog.dataobjects.net/2014/03/dataobjectsnet-50-built-in-logging.html">previous post</a> we explained DataObjects.Net built-in logging capabilities. Now it is time to show how popular logging libraries like <a href="http://logging.apache.org/log4net/">log4net</a> and <a href="http://nlog-project.org/">NLog</a> can be integrated with it.
<br />
<br />
We would need the list of names of built-in logs:<br />
<br />
<br />
<li><tt><b>Xtensive.Orm</b></tt> - logs <tt>Session</tt> & <tt>Transaction</tt>-related events and exceptions.</li>
<li><tt><b>Xtensive.Orm.Building</b></tt> - logs events during the <tt>Domain</tt> building process.</li>
<li><tt><b>Xtensive.Orm.Sql</b></tt> - logs SQL statements sent to database server.</li>
<li><tt><b>Xtensive.Orm.Upgrade</b></tt> - logs events during database schema upgrade.</li>
<br />
<h4>
log4net</h4>
<ol>
<li>Add <a href="http://www.nuget.org/packages/Xtensive.Orm.Logging.log4net/">DataObjects.Net logging provider for log4net</a>. It will automatically add log4net.
</li>
<li>Set up log provider in Xtensive.Orm configuration section<br /><br /><pre> <Xtensive.Orm>
<domains>
<domain ... >
</domain>
</domains>
<b> <logging provider="Xtensive.Orm.Logging.log4net.LogProvider, Xtensive.Orm.Logging.log4net"></b>
</Xtensive.Orm>
</pre>
</li>
<li>Configure log4net. Use the above-mentioned loggers' names, e.g.:
<br /><br />
<pre> <?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
...
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<log4net>
<appender name="ConsoleAppernder" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger %message%newline" />
</layout>
</appender>
<b> <logger name="Xtensive.Orm"></b>
<level value="ALL" />
<appender-ref ref="ConsoleAppernder" />
</logger>
</log4net>
</configuration>
</pre>
</li>
</ol>
<h4>
NLog</h4>
<ol>
<li>Add <a href="http://www.nuget.org/packages/Xtensive.Orm.Logging.NLog/">DataObjects.Net logging provider for NLog</a>. It will automatically add NLog.
</li>
<li>Set up log provider in Xtensive.Orm configuration section<br /><br /><pre> <Xtensive.Orm>
<domains>
<domain ... >
</domain>
</domains>
<b> <logging provider="Xtensive.Orm.Logging.NLog.LogProvider, Xtensive.Orm.Logging.NLog"></b>
</Xtensive.Orm>
</pre>
</li>
<li>Configure NLog. Use the above-mentioned loggers' names, e.g.:<br /><br />
<pre> <?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="console" xsi:type="Console" />
</targets>
<rules>
<b><logger name="Xtensive.Orm" minlevel="Debug" writeTo="console" /></b>
</rules>
</nlog>
</pre>
</li>
</ol>
<br />
<br />
Pretty simple, huh? You can even write your own log provider with ease. Just take a look at the implementation of these two in <a href="https://doextensions.codeplex.com/SourceControl/latest">DataObjects.Net Extensions repository</a>, default branch.</div>
Anonymoushttp://www.blogger.com/profile/07143844311415529548noreply@blogger.com16tag:blogger.com,1999:blog-3955624781368590602.post-9418682586001551182014-03-05T18:26:00.000+06:002014-03-05T18:26:25.278+06:00DataObjects.Net 5.0 built-in logging<div dir="ltr" style="text-align: left;" trbidi="on">
Yeah, we have to admit it - logging in DataObjects.Net 4.x was implemented quite odd and its API was not clear even to some of product developers, not to mention customers who were wondering whether the bloody logging works at all and how the hell it is supposed to be configured. Finally, these days are gone and starting from DataObjects.Net 5.0 we re-implemented the logging.
<br />
<br />
So, what has changed? The answer is - almost all, including inconsistent loggers' names, tricky xml configuration and peculiar log formats. Imho, the best characteristic for the new logging will be <strike>"brain-dead obvious"</strike> "extremely simple".
<br />
<br />
OK, let's dive into the details.
<br />
<h4>
Loggers</h4>
These are named logs that record messages from specific parts of DataObjects.Net. There are 4 of them:
<br />
<br />
<br />
<li><tt><b>Xtensive.Orm</b></tt> - logs <tt>Session</tt> & <tt>Transaction</tt>-related events and exceptions.</li>
<li><tt><b>Xtensive.Orm.Building</b></tt> - logs events during the <tt>Domain</tt> building process.</li>
<li><tt><b>Xtensive.Orm.Sql</b></tt> - logs SQL statements sent to database server.</li>
<li><tt><b>Xtensive.Orm.Upgrade</b></tt> - logs events during database schema upgrade.</li>
<br />
<h4>
Log writers</h4>
<br />
<li><tt><b>Console</b></tt> - writes messages to application's console window, if any. Useful for small & test projects.</li>
<li><tt><b>DebugOnlyConsole</b></tt> - the same as <tt>Console</tt> but writes log data only when a project is run in <tt>Debug</tt> mode.</li>
<li><tt><b>path_to_file</b></tt> - appends log messages to a specified file. If file is absent, it will be created. Useful for development & production environments. <tt>path_to_file</tt> can be either absolute or relative to the application location.</li>
<li><tt><b>None</b></tt> - writes to <tt>/dev/null</tt>.</li>
<br />
<h4>
Configuration</h4>
Configuration of built-in logging is made in application configuration file (app.config or web.config). Logger configuration takes 2 parameters: logger name as <tt>source</tt> and log writer name as <tt>target</tt>.<br />
<br />
Example: Logging everything to Console<br />
<pre> <Xtensive.Orm>
<domains>
<domain name="Default".../>
</domains>
<b> <logging>
<log source="Xtensive.Orm" target="Console"/>
<log source="Xtensive.Orm.Building" target="Console"/>
<log source="Xtensive.Orm.Sql" target="Console"/>
<log source="Xtensive.Orm.Upgrade" target="Console"/>
</logging></b>
</Xtensive.Orm>
</pre>
Example: Logging everything to files<br />
<pre> <Xtensive.Orm>
<domains>
<domain name="Default".../>
</domains>
<b> <logging>
<log source="Xtensive.Orm" target="C:\Orm.log"/>
<log source="Xtensive.Orm.Building" target="C:\Orm.Building.log"/>
<log source="Xtensive.Orm.Sql" target="C:\Orm.Sql.log"/>
<log source="Xtensive.Orm.Upgrade" target="C:\Orm.Upgrade.log"/>
</logging></b>
</Xtensive.Orm>
</pre>
<br />
To simplify things in case you want to write messages from all loggers into the same stream, you may want to use our <b>magic asterisk</b>, like this:
Example: Logging everything to a file<br />
<pre> <Xtensive.Orm>
<domains>
<domain name="Default".../>
</domains>
<b> <logging>
<log source="*" target="C:\Orm.log"/>
</logging></b>
</Xtensive.Orm>
</pre>
In addition to the built-in log writers DataObjects.Net 5 is shipped with 2 extensions allowing to redirect logging output to NLog & log4net. Read about that in the second part.</div>
Anonymoushttp://www.blogger.com/profile/07143844311415529548noreply@blogger.com4tag:blogger.com,1999:blog-3955624781368590602.post-4769352163836310562014-02-28T18:42:00.000+06:002014-02-28T21:43:39.412+06:00DataObjects.Net 5.0 Beta 2<div dir="ltr" style="text-align: left;" trbidi="on">
This is the next step in our road to the upcoming major version of DataObjects.Net. <br />
<br />
<h3>
Changes in Beta 2:</h3>
<ul>
<li> Added support for VB.NET model assemblies<br />
</li>
<li> Increased compilation performance<br />
</li>
<li> Fixed problem with automatic license activation<br />
</li>
<li> Improved logging API<br />
</li>
<li> Removed obsolete <tt>Transaction.OpenAuto()</tt> methods<br />
</li>
<li> <tt>Session</tt> closes connection as soon as the last transaction completes<br />
</li>
<li> New <tt>Session</tt> option <tt>NonTransactionalReads</tt>. <br />
</li>
<li> Added support for <tt>Contains</tt> operation over keys collection<br />
</li>
<li> Added support for persistent fields of <tt>DateTimeOffset</tt> type</li>
<li><tt>Key.TypeInfo</tt> no longer relies on implicit session<br />
</li>
</ul>
Also you may be interested in <a href="http://blog.dataobjects.net/2013/11/dataobjectsnet-50-beta-1.html">changes in DataObjects.Net 5.0 Beta 1</a>.
<br />
<h3>
Download</h3>
Just as always, releases are available from <a href="http://nuget.org/profiles/xtensive">NuGet gallery</a>.</div>Anonymoushttp://www.blogger.com/profile/07143844311415529548noreply@blogger.com16tag:blogger.com,1999:blog-3955624781368590602.post-22178688176028548202014-01-07T16:45:00.000+06:002014-01-07T16:45:21.236+06:00DataObjects.Net 4.6.5<div dir="ltr" style="text-align: left;" trbidi="on">
<h3>
Changes in DataObjects.Net 4.6.5:</h3>
<br />
<tt>[main]</tt> Fixed version validation for entities without explicit version columns<br />
<tt>[main]</tt> Fixed version validation for decimal version fields<br />
<tt>[main]</tt> Optimized aggregate translation in complex scenarios<br />
<tt>[main]</tt> Fixed problem with access to nullable enum columns in final projection<br />
<tt>[main]</tt> Fixed problem with missing calculated columns in final projection<br />
<tt>[main]</tt> Fixed materialization of delayed queries with parameters in final projection<br />
<tt>[main]</tt> Implemented merging of duplicated query parameters<br />
<tt>[main]</tt> Improved handling of unique index conflicts during persist<br />
<tt>[main]</tt> Implemented query batching when ValidateEntityVersions option is enabled<br />
<tt>[sqlserver]</tt> Optimized queries that are executed during driver initialization<br />
<tt>[sqlserver]</tt> Added support for full text data type columns<br />
<tt>[sqlserver]</tt> Added ignoring of filetable objects during upgrade and schema validation<br />
<tt>[sqlserverce]</tt> Fixed translation of DateTime operations in LINQ<br />
<tt>[sqlite]</tt> Fixed translation of DateTime operations in LINQ<br />
<tt>[mysql]</tt> Fixed translation of DateTime operations in LINQ<br />
<br />
<h3>
Download</h3>
Just as always releases are available at <a href="http://get.dataobjects.net/Download">our site</a> and <a href="http://nuget.org/profiles/xtensive">NuGet gallery</a>.</div>
Anonymoushttp://www.blogger.com/profile/07143844311415529548noreply@blogger.com4tag:blogger.com,1999:blog-3955624781368590602.post-79157576841880986972013-12-27T19:50:00.001+06:002013-12-27T19:50:18.167+06:00Winter sale<div dir="ltr" style="text-align: left;" trbidi="on">
This year we're starting our winter sale right on December 27. Just use the coupon code <b>DO2014</b> on checkout and get 50% off all editions of <a href="http://dataobjects.net/prices.aspx">DataObjects.Net</a>. If you want to renew your subscription use <b>DO2014RENEWAL </b>to get 70% discount. <br />
<br />
This special on our products is valid until <b>Wednesday 15 January 2014</b>.<br />
<br />
Should you have any questions, please email to <a href="mailto:sales@x-tensive.com">sales@x-tensive.com</a>.<br />
</div>
Anonymoushttp://www.blogger.com/profile/07143844311415529548noreply@blogger.com1