subsonic / SubSonic-3.0-Templates

T4 Template Project for the peeps
http://subsonic.github.io/
105 stars 46 forks source link

Mysql bug with IsEqualTo and Like #37

Open minus4 opened 14 years ago

minus4 commented 14 years ago

this code:

[code]

var rdr = new Select().From() .Where("orderitem_sessionid") .Like("qA9tRFlFeNyu6TK71EY8a5fpVmfFK6ZQMUAyzzylIRBLyRnDL1") .And("orderitem_productid") .In(product.All().Where(x => x.product_Category == category));

[/code]

creates this miss-fired SQL

SELECT ID, orderitem_orderid, orderitem_productid, orderitem_qty, orderitem_total, orderitem_sessionid, orderitem_internal, orderitem_measurement FROM orderitems\r\n\r\n WHERE orderitem_sessionid LIKE @0 AND orderitem_productid IN (@1In1,@1In2,@1In3,@1In4,@1In5,@1In6,@1In7,@1In8,@1In9,@1In10,@1In11,@1In12,@1In13,@1In14,@1In15,@1In16,@1In17,@1In18,@1In19,@1In20)

notice the @0

this is also same for IsEqualTo, i have tried a smaller string of just five letters and still no joy subsonic allways outputs a zero