Tinyint as byte nhibernate

I have a table with a tinyint column in a SQL Server 2008 R2 database, which maps to a byte property in my POCO.

The problem is whenever I run a query with a where clause on the tinyint column using NHibernate, it results in the following sql...

and cast(table0_.TinyIntColumn as INT)=@p1 

I just want to know how to get rid of this behaviour, because although the query still works its annoying and unnecessary, so anyone know of any solutions or come across this before?



This seems to be a bug in the LINQ provider.

Of the following queries:

session.CreateQuery("from Foo where TinyIntColumn = :b").SetParameter("b", 1)
session.QueryOver<Foo>().Where(x => x.TinyIntColumn == 1)
session.Query<Foo>().Where(x => x.TinyIntColumn == 1)

...Only the last one results in the behavior you are experiencing.

Please open an issue at https://nhibernate.jira.com/

Need Your Help

“Kitchen list” command fails with “Could not load the 'ssh' transport from the load path”

ruby ssh chef test-kitchen

I'm trying to add a Test Kitchen to a Chef cookbook but am getting the error "Could not load the 'ssh' transport from the load path".

Calling BeginRead from a NetworkStream

c# network-programming networkstream

Ok I want to connect to a Socket and read a network stream using the System.Net.Sockets.NetworkStream class. This is what I have so far:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.