Questions tagged [lift-mapper]

8 questions
4
votes
1 answer

How to enforce creating new transaction in Lift Mapper?

We are using Lift + Mapper (version 2.4) in our project. We as well are using transaction-per-request pattern S.addAround(DB.buildLoanWrapper()). In one of our requests we need to have nested transaction which we found to be problematic. We found…
Andriy Plokhotnyuk
  • 7,497
  • 2
  • 39
  • 62
2
votes
1 answer

'OR' some QueryParam(s) Lift mapper

Is there any way to "OR" two or more QueryParam s in liftWeb (scala) ? For example, the following code snippet , creates two QueryParams, but 'User.findAll' create "AND" clause, I mean that it finds every user that satisfies both 'queryParam1' and…
fahim ayat
  • 192
  • 4
  • 10
1
vote
1 answer

Scala-Lift redirect user after login

I want to redirect to a certain page after a user logs in to my Scala Lift web application. I found this answer which doesn't seem to work: In my User object (which is a MetaMegaProtoUser) I override the following method like so: object User extends…
0
votes
1 answer

Lift-mapper - inserting items to database

I am trying to add item to H2 database. My code is: class Test extends LongKeyedMapper[Test] with IdPK { def getSingleton = Test object name extends MappedString(this, 100) } and Test.create.name("some_name").id(2).save, but I always get…
pt12lol
  • 2,080
  • 1
  • 18
  • 40
0
votes
1 answer

Lift (Mongo)Record field auto-computed from another field

I have a field that holds a datetime as well as a denormalization field to store that same datetime value as a unix timestamp (for reasons that are beyond my control at the moment). I would like the timestamp field to always be in sync with the…
Erik Kaplun
  • 33,421
  • 12
  • 92
  • 102
0
votes
1 answer

How to store a Json File Using Lift Mapper in MySql

I am new to Liftweb. I want to Store a Json File in Mysql database using Lift Mapper My Json File Like Below:- [ { "name": "Root Category", "Id": "1", "dispName": "", "childs": [ { "name": "Sub Category", …
sagar
  • 123
  • 1
  • 2
  • 10
0
votes
1 answer

Can not add CURDify menu to sitemap in lift

I have sitemap code like that: object Site { val booksMenus = Book.menus val authorsMenus = Author.menus val publishersMenus = Publisher.menus def sitemap = SiteMap( home >> LocGroup("lg1"), …
Amir Asaad
  • 88
  • 1
  • 9
0
votes
1 answer

How to apply transformations/filters on Lift Record Field before writing/reading its value

I'm using Lift Record persistence and I want to apply some transformations on a Field whenever I set or get its value. For instance, for StringField I want to set it to lower case automatically in Record object. object someField extends…
yǝsʞǝla
  • 15,379
  • 1
  • 39
  • 63