FYI, the datetime fix is merged to master. Derek
On Wed, Mar 18, 2009 at 9:16 AM, Derek Chen-Becker <[email protected]>wrote: > Also, as Tim pointed out we may need to change the varchar defs on the SQL > Server Driver to nvarchar. There's also the issue of VARCHAR(MAX) (SQL > Server 2005 and up) vs TEXT (older versions). Perhaps we need n additional > SqlServerPre2005Driver class? > > Derek > > > On Wed, Mar 18, 2009 at 8:56 AM, Derek Chen-Becker > <[email protected]>wrote: > >> Just to confirm, you're using the latest jTDS driver, right? >> >> Derek >> >> >> On Wed, Mar 18, 2009 at 8:39 AM, Timothy Perrett <[email protected] >> > wrote: >> >>> >>> Ok thats interesting about Text/Varchar(max)... I didnt know that. >>> Whats the JTDS support for that? Is it ok? >>> >>> This is where things get freaky! Doing m.description.is.getClass gives >>> me "class java.lang.String". I mean, wtf, which are you? Clob or >>> String! HAHA >>> >>> Thoughts? >>> >>> Tim >>> >>> On Mar 18, 2:05 pm, Derek Chen-Becker <[email protected]> wrote: >>> > Yeah, I saw the varchar(max) definition. I searched around and it looks >>> like >>> > TEXT is deprecated in favor of VARCHAR(MAX) in Sql Server 2005. >>> > >>> > http://stackoverflow.com/questions/564755/sql-server-text-type-v-s-va. >>> .. >>> > >>> > Maybe we need to make a new SqlServer2005 Driver that uses VARCHAR(MAX) >>> and >>> > change the current one to use TEXT. Thoughts? Part of my confusion is >>> that >>> > MappedText has an explicit String type parameter, but it *appears* that >>> > you're getting a ClobImpl. Could you me a favor and print out >>> > >>> > m.description.is.getClass >>> > >>> > and see what is really being stored in the field? I'm wondering if >>> somehow >>> > the Clob is being converted to a string lower in the chain so you're >>> just >>> > getting a string of "net.sourceforge.jtds.jdbc.clobi...@aeaf68". >>> > >>> > Derek >>> > >>> > On Wed, Mar 18, 2009 at 3:45 AM, Timothy Perrett >>> <[email protected]>wrote: >>> > >>> > >>> > >>> > > Hey Derek, >>> > >>> > > I know – this confused me too. The current MappedText for SQL Server >>> is >>> > > being implemented as Varchar(MAX) in the database. >>> > >>> > > I always to m.description.toString and this way I get the clob >>> reference. >>> > >>> > > Excuse my ignorance, but shouldn’t MappedText actually be using >>> “text” >>> > > column type? >>> > >>> > > Cheers, Tim >>> > >>> > > On 17/03/2009 19:19, "Derek Chen-Becker" <[email protected]> >>> wrote: >>> > >>> > > Actually, now I'm more confused. In the MappedText source it's using >>> the >>> > > JDBC type VARCHAR. In MetaMapper's buildMapper method it appears that >>> > > VARCHAR should be retrieved via a resultSet.getString call, which >>> should >>> > > return the String form of the data. I confirmed this in jTDS source: >>> > >>> > > >>> http://jtds.cvs.sourceforge.net/viewvc/jtds/jtds/src/java/net/sourcef... >>> > >>> > > Line 289. I have no idea how you're getting a real ClobImpl object, >>> since >>> > > the source seems to indicate that it should just be a String: >>> > >>> > > class MappedText[T<:Mapper[T]](val fieldOwner: T) extends >>> > > MappedField[String, T] >>> > >>> > > Derek >>> > >>> > > On Tue, Mar 17, 2009 at 2:08 PM, Derek Chen-Becker < >>> [email protected]> >>> > > wrote: >>> > >>> > > OK, check out the wip-dcb-datetime branch and test that. >>> > >>> > > It looks like the CLOB object that jTDS returns doesn't override >>> toString >>> > > to return the contents of the CLOB. It does, however, implement the >>> > > java.sql.Clob interface, so it may be possible to match that somehow >>> and >>> > > make it work. I'm diving into parts of Mapper that I haven't really >>> worked >>> > > with before, so no guarantees. Just to confirm, can you change your >>> snippet >>> > > to use: >>> > >>> > > "description" -> m.description.toString >>> > >>> > > and see if you get the same thing? >>> > >>> > > Thanks, >>> > >>> > > Derek >>> > >>> > > On Tue, Mar 17, 2009 at 1:05 PM, Timothy Perrett >>> <[email protected]> >>> > > wrote: >>> > >>> > > Hey Derek, >>> > >>> > > Awesome - thanks. I knew the DataTime one would be a simple fix - I >>> > > just don't know enough about mapper. >>> > >>> > > #17 is the one thats really hurting me right now... if you could fix >>> > > that I would be sooo grateful! >>> > >>> > > Cheers, Tim >>> > >>> > > On Mar 17, 6:02 pm, Derek Chen-Becker <[email protected]> wrote: >>> > > > OK, actually, the change is in SqlServerDriver. I've made the >>> change and >>> > > I'm >>> > > > running a build before committing. Once I push the branch could you >>> check >>> > > it >>> > > > out and test? I'm looking at #17 right now, too. >>> > >>> > > > Derek >>> > >>> > > > On Tue, Mar 17, 2009 at 12:44 PM, Derek Chen-Becker >>> > > > <[email protected]>wrote: >>> > >>> > > > > I think the DateTime issue should be fixed pretty easily in >>> > > MappedDateTime >>> > > > > itself. Let me make a new branch and make a minor change. >>> > >>> > > > > Derek >>> > >>> > > > > On Tue, Mar 17, 2009 at 12:09 PM, Timothy Perrett < >>> > > [email protected] >>> > > > > > wrote: >>> > >>> > > > >> *bump* >>> > >>> > > > >> Al, any progress on these? >>> > >>> > > > >> Cheers, Tim >>> > >>> > > > >> On Mar 10, 11:04 am, Timothy Perrett <[email protected]> >>> wrote: >>> > > > >> > Is someone able to take ownership of these tickets? >>> > >>> > > > >> > Cheers, Tim >>> > >>> > > > >> > On Mar 9, 5:52 pm, Tim Perrett <[email protected]> >>> wrote: >>> > >>> > > > >> > > Guys, >>> > >>> > > > >> > > Just logged a couple of bugs for SQL Server drivers: >>> > >>> > >http://liftweb.lighthouseapp.com/projects/26102/tickets/18-sql-server >>> . >>> > > > >> .. >>> > >>> > >http://liftweb.lighthouseapp.com/projects/26102/tickets/17-mappedtext >>> . >>> > > > >> .. >>> > >>> > > > >> > > Can someone take a look? This really is not my speciality. >>> > >>> > > > >> > > Cheers, Tim >>> >>> >>> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
