DO 5.0.17

namespace Sample
    using System;
    using System.Linq;
    using NUnit.Framework;
    using Xtensive.Core;
    using Xtensive.Orm;
    using Xtensive.Orm.Configuration;

    public class SimpleEntity : Entity
        public SimpleEntity(Guid id)
            Id = id;

        public Guid Id { get; }

        public string Name { get; set; }

    class Program
        static void Main(string[] args)
            var dc = new DomainConfiguration("sqlserver",
                "Data Source=.; Initial Catalog=DO40-Tests; Integrated Security=True;");


            dc.UpgradeMode = DomainUpgradeMode.Recreate;

            using (var domain = Domain.Build(dc))
            using (var session = domain.OpenSession(SessionType.Default))
            using (session.Activate())
            using (session.OpenTransaction())
                new SimpleEntity(Guid.NewGuid()) { Name = "&&%name" };
                new SimpleEntity(Guid.NewGuid()) { Name = "&%name" };

                var queryable = session.Query.All<SimpleEntity>();

                var ent1 = queryable.Single(z => z.Name.Like("&&&%name", '&'));

                var ent2 = queryable.ToArray().Single(z => z.Name.Like("&&&%name", '&'));

                Assert.AreEqual(ent1, ent2);

asked Sep 25 at 01:56

Gushchin%20Anton's gravatar image

Gushchin Anton

One Answer:


We have fixed it in developing branch, it will be available in future release

answered Nov 15 at 04:05

Alexey%20Kulakov's gravatar image

Alexey Kulakov

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA