On Sat, Aug 15, 2009 at 11:14 AM, harryh har...@gmail.com wrote:
class Foo extends LongKeyedMapper[Foo] with IdPK {
def getBazes = {
Baz.findAll(In(Baz.barid, Bar.id, By(Bar.fooid, this)))
}
OK, upgrading to 1.1-M4 got rid of the NPE so I'm just gonna assume
there was a bug that
class Foo extends LongKeyedMapper[Foo] with IdPK {
def getBazes = {
Baz.findAll(In(Baz.barid, Bar.id, By(Bar.fooid, this)))
}
OK, upgrading to 1.1-M4 got rid of the NPE so I'm just gonna assume
there was a bug that has been fixed. However the SQL query that lift
is generating is no
Please post a reproducible example. I use this call pretty regularly and
have not seen any problems.
Sure thing. I will put something together tomorrow. If feel like I
must be making a silly newbie mistake of some kind because I'm sure
that you (and others) must be doing this sort of things
One possibility is to do Baz.findAllBy{PreparedStatement,InsecureSql}
(section 6.3.2 of lift book)
I am also curious if there is a safe way to construct a join.
- Jon
On Aug 13, 3:41 pm, harryh har...@gmail.com wrote:
I have 3 classes like so
class Foo extends LongKeyedMapper[Foo] with IdPK
On Thu, Aug 13, 2009 at 12:41 PM, harryh har...@gmail.com wrote:
I have 3 classes like so
class Foo extends LongKeyedMapper[Foo] with IdPK
def getBazes = {
Baz.findAll(...)
}
}
Baz.findAll(In.fk(Baz.barid, By(Bar.fooid, this.id)))
class Bar extends LongKeyedMapper[Bar] with
Sorry... try:
class Foo extends LongKeyedMapper[Foo] with IdPK {
def getBazes = {
Baz.findAll(In(Baz.barid, Bar.id, By(Bar.fooid, this)))
}
}
object Foo extends Foo with LongKeyedMetaMapper[Foo]
class Bar extends LongKeyedMapper[Bar] with IdPK {
object fooid extends
Now I get an NPE :(
Message: java.lang.NullPointerException
net.liftweb.mapper.In$$anon$3.init(MetaMapper.scala:1206)
net.liftweb.mapper.In$.apply(MetaMapper.scala:1200)
com.harryh.model.Venue.checkins(Venue.scala:40)
-harryh
Please post a reproducible example. I use this call pretty regularly and
have not seen any problems.
Also, what version of Lift are you using?
On Thu, Aug 13, 2009 at 2:31 PM, harryh har...@gmail.com wrote:
Now I get an NPE :(
Message: java.lang.NullPointerException