Re: [Lift] Newbie Question: Problems compiling/running examples

2009-11-26 Thread David Bernard
The latest and older maven-scala-plugin require maven 2.0.9. (I used maven 2.2.1 to build the plugin) On Mon, Nov 23, 2009 at 05:01, David Pollak wrote: > Try running with Maven 2.2.x > > I think the latest Scala Maven plugin may require a version of Maven newer > than 2.0.9 > > > On Sun, Nov 22,

[Lift] Access do Database objects from scala:console

2009-11-26 Thread Marcin Jurczuk
Hello, Can someone point me how to access data from Box object return by mapper query: Here is example (mvn scala:console) scala> new bootstrap.liftweb.Boot().boot scala> import pl.com.company.model._ import pl.com.company.model._ scala> import _root_.net.liftweb.mapper._ import _root_.net.lif

[Lift] Re: derby

2009-11-26 Thread opyate
Hi Jack, There are quite a few examples readily available that comes configured with Derby: http://github.com/dpp/liftweb/tree/master/lift-examples/ http://github.com/tjweir/pocketchangeapp In Boot.scala you'll see a Derby ConnectionManager defined. If you want to go the JNDI route: In Boot.sc

Re: [Lift] Access do Database objects from scala:console

2009-11-26 Thread Jeppe Nejsum Madsen
Marcin Jurczuk writes: > Hello, > > Can someone point me how to access data from Box object return by > mapper query: [...] > scala> var r = RejDocBin.find(By(RejDocBin.DocBinId,4)) > r: net.liftweb.common.Box[pl.com.company.model.RejDocBin] = Full > (pl.com.company.model.RejDocBin= > {docbin..

[Lift] Re: Validations

2009-11-26 Thread suls
Thanks David, this did the trick.Out of curiosity: where in the docs could I have found this information? http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/builtin/snippet/Msgs.html doesn't seem to be updated .. - suls On Nov 25, 8:01 pm, David Pollak wrote: > On Wed, Nov 25, 2009 at 11:5

[Lift] Re: Access do Database objects from scala:console

2009-11-26 Thread Marcin Jurczuk
Thanks .. read that ...and look and dmap implementation however it doesn't work like I expected: scala> r.dmap("application/octet-stream")(_.contentType.is) res49: java.lang.String = null scala> There should be "application/octet-stream" result scala> s.dmap("app")(_.contentType.is) res50: jav

Re: [Lift] derby

2009-11-26 Thread David Pollak
On Wed, Nov 25, 2009 at 10:48 PM, jack wrote: > Could somebody point me to a quickstart or tutorial about how to use > Derby with Lift? > Derby is inferior in every way to H2 (another open source pure Java relational database). If you're building something for production, Postgresql is your bes

Re: [Lift] Re: Access do Database objects from scala:console

2009-11-26 Thread Jeppe Nejsum Madsen
Marcin Jurczuk writes: > Thanks .. read that ...and look and dmap implementation however it > doesn't work like I expected: > > > scala> r.dmap("application/octet-stream")(_.contentType.is) > res49: java.lang.String = null This is (probably) because contentType is null. The dmap only opens the B

[Lift] Re: Access do Database objects from scala:console

2009-11-26 Thread Marcin Jurczuk
Thanks ! :) Your solution is much DRY then my :) : {img.contentType.toString.isEmpty match { case true => "application/ octet-stream" case false => img.contentType.is.toString}} Best regards, On 26 Lis, 15:10, Je

[Lift] Oracle DB connection in 1.1-m7

2009-11-26 Thread suls
Hi, I see that there is a DriverType and OracleDriver in 1.1-m7 but again I don't know how to connect the dots. How would a DB.defineConnectionManager method call that uses an oracle db look like? Thanks, suls -- You received this message because you are subscribed to the Google Groups "Lift"

Re: [Lift] Looking for an example of how to do master detail, on the view side

2009-11-26 Thread Jim Barrows
Excellent. He's already where I was headed :) On Wed, Nov 25, 2009 at 8:51 PM, David Pollak wrote: > Kris blogged about a really nice pattern: http://logji.blogspot.com/ > > On Wed, Nov 25, 2009 at 3:16 PM, Jim Barrows wrote: > >> I'm using JPA, and need to do a One->Many, or master detail view

Re: [Lift] Looking for an example of how to do master detail, on the view side

2009-11-26 Thread Timothy Perrett
Agreed - Kirs' idea is a nice one. It would be good to incorporate such a pattern in the lift examples. Cheers, Tim On 26 Nov 2009, at 15:42, Jim Barrows wrote: > Excellent. He's already where I was headed :) > > On Wed, Nov 25, 2009 at 8:51 PM, David Pollak > wrote: > Kris blogged about a

[Lift] Re: Oracle DB connection in 1.1-m7

2009-11-26 Thread Mathias Sulser
All right. Figuring out the proper JDBC string was all. Schemifyer seems to then pick the right driver and produce DDL for the specific DB. Great stuff. On Nov 26, 3:17 pm, suls wrote: > Hi, > > I see that there is a DriverType and OracleDriver in 1.1-m7 but again > I don't know how to connect t

[Lift] Re: Oracle DB connection in 1.1-m7

2009-11-26 Thread Mathias Sulser
I think the MappedBoolean isn't properly done in the OracleDriver: scala> User.findAll(By(User.superUser, false)) java.sql.SQLException: Invalid column type at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlEx

[Lift] simple database question

2009-11-26 Thread jack
I have my database configured properly in Boot.scala and in my pom.xml. Suppose I have a table name person with a field called name. What is the simple code to return all rows of this table using Mapper. I want to understand the essence of how lift ties tables to objects with a simple example. --

[Lift] Re: simple database question

2009-11-26 Thread harryh
val people = Person.findAll() On Nov 26, 1:22 pm, jack wrote: > I have my database configured properly in Boot.scala and in my > pom.xml. Suppose I have a table name person with a field called name. > What is the simple code to return all rows of this table using Mapper. > I want to understand th

[Lift] Re: simple database question

2009-11-26 Thread jack
wow. thats impressive. But for this, what does the Person class have to look like? Suppose I have the table but I don't have the Person class written. What does it need to look like? On Nov 26, 1:32 pm, harryh wrote: > val people = Person.findAll() > > On Nov 26, 1:22 pm, jack wrote: > > > I hav

[Lift] Re: simple database question

2009-11-26 Thread TylerWeir
Take a look at the User class example: http://github.com/dpp/liftweb/blob/master/lift-examples/hellolift/src/main/scala/com/hellolift/model/User.scala On Nov 26, 1:39 pm, jack wrote: > wow. thats impressive. But for this, what does the Person class have > to look like? Suppose I have the table bu

[Lift] Re: simple database question

2009-11-26 Thread harryh
Here is what you need for a minimal Person table that contains two columns: an id for the primary key, and name which is a string: package com.jacksdomain.model import net.liftweb.mapper._ class Person extends LongKeyedMapper[Person] with IdPK { def getSingleton = Person object name extends

Re: [Lift] Re: simple database question

2009-11-26 Thread Jack Widman
excellent. Thanks. Just what I needed. On Thu, Nov 26, 2009 at 2:34 PM, harryh wrote: > Here is what you need for a minimal Person table that contains two > columns: an id for the primary key, and name which is a string: > > package com.jacksdomain.model > > import net.liftweb.mapper._ > > class

[Lift] Impossible to use Mapper on GAE?

2009-11-26 Thread jlist9
Hi, I read from the list that Mapper is not supported on Google App Engine (I see people use JPA instead.) I wonder if this is a matter of non-existent drivers, or there are some fundamental issues that make it impossible? Thanks, Jack -- You received this message because you are subscribed to t

Re: [Lift] derby

2009-11-26 Thread jlist9
Hi David, Would you care to elaborate in what way Derby is inferior? I understand H2 is probably faster as speed is one of its main design goals. Does Derby have any other issues? Are there any potential issues with using H2 for production? Thanks, Jack > Derby is inferior in every way to H2 (a

[Lift] Re: how does lift work with redis?

2009-11-26 Thread surfman
So, if I want to use nosql database with LIFT, what I have to use is JDBC driver, am I right? Any experienced suggestion? Google has very little searching result on it. I'd appreciate any idea on this topic. Thanks. Regards, Surfman On 11月25日, 下午4时06分, Timothy Perrett wrote: > Correct - Redis i