Thanks Maxime,
I did the trace you suggested, and it returned TRUE, which is correct.
Funny, it means that from Squeryl side everything is correct and even
Squeryl-record gets it correct at some point.
Rusho
On 4. Mar., 16:40 h., Maxime Lévesque <
maxime.leves...@gmail.com>
wrote:
> It has to be happening here :
>
>
https://github.com/lift/framework/blob/master/persistence/squeryl-rec...
>
> in this method :
>
> override def setFromResultSet(target: AnyRef, rs: ResultSet, index: Int) =
> fieldFor(target).setFromAny(Box!!resultSetHandler(rs, index))
> *
> *
> *If you can trace what is happening, like this :*
>
> override def setFromResultSet(target: AnyRef, rs: ResultSet, index: Int) =
> fieldFor(target).setFromAny* {*
> * val r = resultSetHandler(rs, index)*
> * println(r) // <-----*
> Box!! r
> }
>
> *it will be very helpful*
>
> you can override RecordMetaDataFactory :
> class YourRecordMetaDataFactory extends RecordMetaDataFactory {
> ....
>
> override def build(parentMetaData: PosoMetaData[_], name: String,
> property: (Option[Field], Option[Method], Option[Method],
> Set[Annotation]),
> sampleInstance4OptionTypeDeduction: AnyRef,
> isOptimisticCounter: Boolean)
> {
> ..... copy the code from the parent class, and override setFromResultSet
> to be able to insert trace code....
> *}*
>
> *}*
> *
> *
> *and do this after bootstrapping :*
> *
> *
> *FieldMetaData.factory = new YourRecordMetaDataFactory*
>
> to override the *RecordMetaDataFactory set here :*
> *
> *
https://github.com/lift/framework/blob/master/persistence/squeryl-rec...
>
> *I'm not setup to debug Lift right now, but in 15 minutes you should be able
> to *
> *do the above investigation without the need to checkout the lift source
> code....*
> *
> *
> *ML*
> *
> *
>
>
>
> On Fri, Mar 4, 2011 at 4:10 PM, Rusho <
ras...@gmail.com> wrote:
> > Hi all,
>
> > I'm not sure if it's a Squeryl issue or Lift Squeryl-record issue.
> > However, I use Squeryl-record in my project, and if I have a
> > BooleanField defined, it always returns false, although in database
> > there's true.
>
> > From Squeryl logs it seems, that squeryl is correctly getting true
> > value, but I'm not sure at which level squeryl logs fetched data, so
> > it might be, that it's squeryl's problem too, not squeryl-record's
>
> > A friend of mine posted the issue on Lift's googlegroup, but nobody
> > answered so far:
> >
http://groups.google.com/group/liftweb/browse_thread/thread/5a9ff35bd...