Announcing Lift 2.2-RC2

76 views
Skip to first unread message

Indrajit Raychaudhuri

unread,
Dec 15, 2010, 7:00:26 AM12/15/10
to lift-announce, Lift, scala-a...@listes.epfl.ch
The Lift team is pleased to announce Lift 2.2-RC2.

Lift is an elegant, expressive framework that allows any size team build and maintain secure, highly interactive, scalable web applications quickly and efficiently. Lift is built on Scala and compiles to JVM byte-code. Lift applications deploy as web archives (WAR files) on popular application servers and web containers including Jetty, Glassfish and Tomcat. Lift applications can be monitored and managed with the same proven infrastructure used to manage and monitor any Java web application. Lift is open source licensed under an Apache 2.0 license.

This is the second release candidate in the 2.2-RC* series following up on Lift 2.2-RC1 released last week. Since then, the team has closed 13 tickets.

Lift 2.2 would support all of Scala 2.7.7, 2.8.0 and 2.8.1. This would also be the last version to support Scala 2.7.7, the future version would be for Scala 2.8+ only (see post).

Please join the Lift community and help us grow Lift. And a super-big thanks to the 30+ Lift committers who have grown the Lift community and code-base to what it is today... and what it will be in the future!  

We expect to ship Lift 2.2 release on January 5th. All going well, this is probably going to be the last RC before final release. Please test these 2.2-RC* series and help us identify bugs so we can make Lift 2.2 awesome!

Thank you, have fun as always!
- The Lift team

Donald McLean

unread,
Dec 15, 2010, 9:03:42 AM12/15/10
to lif...@googlegroups.com
You guys are the bee's knees.

Donald

David Pollak

unread,
Dec 15, 2010, 9:08:03 AM12/15/10
to sc...@listes.epfl.ch, Lift
Indrajit -- Awesome job spinning 2.2-RC2... I slept through the whole thing. ;-)

Community -- Looking forward to your bug reports.

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Olger Warnier

unread,
Dec 15, 2010, 9:30:12 AM12/15/10
to Lift
Hi List,

I have some issues with Mapper and a String as primary key.
With the LongKeyedMapper as sample, I added them for the String :

trait BaseStringKeyedMapper extends BaseKeyedMapper {
override type TheKeyType = String
}

trait StringKeyedMapper[OwnerType <: StringKeyedMapper[OwnerType]] extends KeyedMapper[String, OwnerType] with BaseStringKeyedMapper {
self: OwnerType =>
}

trait StringKeyedMetaMapper[A <: StringKeyedMapper[A]] extends KeyedMetaMapper[String, A] { self: A => }

and in my Mapped class/object et all I've:

class ApplicationSetting extends StringKeyedMapper[ApplicationSetting] {
def getSingleton = ApplicationSetting

def primaryKeyField = name
object name extends MappedStringIndex(this, 80) {
override def writePermission_? = true
override def dbIndexed_? = true
}

object setting extends MappedString(this, 200)
}
object ApplicationSetting extends ApplicationSetting with StringKeyedMetaMapper[ApplicationSetting]

Usage:

val newObj = ApplicationSetting.create.name('mypropname')
newObj.setting("hello world")
newObj.save

With the writePermission on false, i get an exception (rightly so)
With the writePermission set to true, it seems to work only the record created in the database (mysql) has the 'setting'' field filled with data, the name field is empty. (quite strange this happens for a primary key field...)

I found a primaryKeyAutogenerated : Box[Boolean] in MetaMapper, but that one is private...

Maybe it's the wrong approach for a non-autogenerated record, I would like to do something like ApplicationSetting.create('mypropname') to create on with a primary key. (but don't know what will break when I do that. )
Next to that, I'll but the overrides for the name field in an extended MappedStringIndex to make it more clear what happens.

Any pointers on solving this issue ?

Reading / Updating the setting works like charm...


David Pollak

unread,
Dec 15, 2010, 11:46:02 AM12/15/10
to lif...@googlegroups.com
From the Mapper tests:

import java.util.UUID

object Thing extends Thing with KeyedMetaMapper[String, Thing] {
  override def dbTableName = "things"
  override def beforeCreate = List((thing: Thing) => {
    thing.thing_id(UUID.randomUUID().toString())
  })
}

class Thing extends KeyedMapper[String, Thing] {
  def getSingleton = Thing
  def primaryKeyField = thing_id

  object thing_id extends MappedStringIndex(this, 36) {
    override def writePermission_? = true
    override def dbAutogenerated_? = false
    override def dbNotNull_? = true
  }

  object name extends MappedString(this, 64)
}

Note that the primary key for Thing is generated in the beforeCreate method, but you can do it however you want.








--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Olger Warnier

unread,
Dec 15, 2010, 1:34:55 PM12/15/10
to lif...@googlegroups.com
Thanks, you saved my day. 

The

 override def dbAutogenerated_? = false

was missing (I tried to override dbAutogenerated instead of the dbAutogenerated_?)
It works fine now. 
Reply all
Reply to author
Forward
0 new messages