each dialect defines the behavior of "8000" On Wed, Oct 6, 2010 at 10:31 AM, srf <[email protected]> wrote:
> ya, Ill look but it looks like when we set the length to 8001 then ddl > code generation would generate a varbinary(max) but without it, it > generates a varbinary(8000). The problem is you dont want to set a > large value for length since sqlserver and oracle would have a diffent > length. At any rate I think this one change have some ripple effects > into a lot of other places but Im going to dig into it further and see > whats going on anyhow. > > thanks > > scott > > On Oct 5, 3:32 pm, Fabio Maulo <[email protected]> wrote: > > Different problem should have different issue# and appropriate tests. > > Please use the JIRA is you find another breaking-change related with the > > parameter-length set by default. > > > > > > > > > > > > On Tue, Oct 5, 2010 at 6:29 PM, srf <[email protected]> wrote: > > > does it also have any effect on BinaryBlob types since I currently > > > have a BinaryBlob type with a length =8001 and now with nh3 the binary > > > data seems to get truncated but not in nh2. > > > > > scott > > > > > On Oct 5, 3:09 pm, Fabio Maulo <[email protected]> wrote: > > > > Have a look to NH3. > > > > I have changed some behavior and...ARGGGG!!! in .NET, without add a > > > > reference to Microsoft.SqlServer.something, there isn't a way to set > the > > > > size to "MAX". > > > > btw, using StringClob, you have the default size set to the max.... > wait > > > let > > > > me find the issue... > > > > foundhttp://216.121.112.228/browse/NH-2302 > > > > <http://216.121.112.228/browse/NH-2302>revision 5174 > > > > > > On Tue, Oct 5, 2010 at 5:24 PM, Michael Teper <[email protected]> > wrote: > > > > > This should be documented as a breaking change for NH3 -- I have a > > > > > number of strings mapped to nvarchar(max) fields today in 2.1.2 > that > > > > > look like <property name="Blah" /> and work fine with large values. > > > > > > > For reference, nvarchar(max) max length is 1,073,741,822 (from > > > > > > > > http://www.sql-server-helper.com/sql-server-2005/..%5Cfaq%5Csql-serve. > > > .. > > > > > ) > > > > > > > Thanks! > > > > > -Michael > > > > > > > On Oct 5, 1:17 pm, srf <[email protected]> wrote: > > > > > > Ya, I figured so, I tried switching to StringClob and it > basically > > > did > > > > > > what I mentioned and set the size to a really large size and > worked > > > so > > > > > > Im ok with that and will make that change. Just as an thought, > would > > > > > > it be helpfull if when setting the paramter.value we can see that > the > > > > > > if the parameter size is less then the length of the text that it > > > > > > would get cut off and maybe nhibernate should raise a warning or > > > > > > exception like "hey your text is going to get cuttoff , are you > sure > > > > > > you want to do this??" or something like that? you would thing > > > > > > something farther down like ado.net or sqlserver would also flag > it > > > > > > too rather than just cutting it off and continuing like nothing > bad > > > > > > has just happened. > > > > > > > > thanks > > > > > > > > scott > > > > > > > > On Oct 5, 2:05 pm, Ayende Rahien <[email protected]> wrote: > > > > > > > > > No, the parameter size should be fixed. That ensures that you > have > > > > > > > consistent query plans. > > > > > > > Specify that the field type is StringClob in the mapping > > > > > > > > > On Tue, Oct 5, 2010 at 9:54 PM, srf <[email protected]> > wrote: > > > > > > > > I was trying to figure out why things working working anymore > in > > > > > > > > nhibernate 3 and noticed that in nhibernate 2 the > > > dbparameter.size > > > > > > > > would be set to what the dbparameter.value's length was as > long > > > as > > > > > the > > > > > > > > dbparameter.size was set to 0. Now in nhibernate 3, the > > > > > > > > dbparameter.size is getting set because line 164 in > > > > > SqlClientDriver.cs > > > > > > > > is commented out so its now by default setting the size to > some > > > fixed > > > > > > > > size rather than setting the size to what the parameter value > > > size > > > > > is. > > > > > > > > So I was wondering why that is commented out now. The problem > I > > > have > > > > > > > > is that I have varchar(max) values and the parameter size > could > > > be > > > > > > > > really large so the parameter size need to be set to what the > > > length > > > > > > > > of the text inserted or sqlserver will just cut it off to > > > whatever > > > > > the > > > > > > > > parameter.size is. Is handling really large text like > > > varchar(max) to > > > > > > > > be done differently? > > > > > > > > > > thanks > > > > > > > > > > scott- Hide quoted text - > > > > > > > > > - Show quoted text -- Hide quoted text - > > > > > > > > - Show quoted text - > > > > > > -- > > > > Fabio Maulo- Hide quoted text - > > > > > > - Show quoted text - > > > > -- > > Fabio Maulo- Hide quoted text - > > > > - Show quoted text - -- Fabio Maulo
