Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:16:06+00:00 2026-05-29T09:16:06+00:00

I have thrown together a small Lift application, using CRUDify, to perform basic CRUD

  • 0

I have thrown together a small Lift application, using CRUDify, to perform basic CRUD operations on some database tables.

Several columns are of type “CHAR (1 byte)“, and are intended to store values of “Y” or “N“. My model class defines those fields like this example:

...
object isActive extends MappedEnum(this, YesNo) {
 override def dbColumnName = "IS_ACTIVE"
 override def displayName = "Active"
}
...

That type, “YesNo” is a Scala object defined as follows:

object YesNo extends Enumeration {
  val Y, N = Value
}

In the web browser forms that are auto-generated by CRUDify, columns such as this do show up with “Y” and “N” as the available options. However, when you create or edit a row… what actually gets stored is “1” or “0“!

Clearly, I’m just missing the boat on something here. How can I structure this such that CRUDify will allow users to select from “Y” or “N” in the browser, and store either “Y” or “N” in the database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:16:07+00:00Added an answer on May 29, 2026 at 9:16 am

    Hmm… not a huge Scala / Lift community here on StackOverflow! Actually, it may be that there isn’t much of a community for this “CRUDify” sub-component of Lift anywhere.

    At any rate, I eventually found an answer (sorta) by subscribing to the “liftweb” Google Groups mailing list. Apparently, this is a known limitation in the CRUDify framework. It’s been like that for years and is not a limitation that anyone particularly cares about, but it is known.

    One developer back in 2009 tried to find a way around this by creating his own custom subclass of MappedField, and using that as the mapped type in his Lift model classes. The 140-line class, along with an email briefly describing it, may be found at:

    http://groups.google.com/group/liftweb/browse_frm/thread/34560f30fab299a7/cdca54c8e1486237?pli=1

    I am not sure that this worked 100% back in 2009, and it has a ton of problems when I tried to use it here in 2012 (Scala and Lift have both changed a lot over the past three years).

    I invested a small amount of time into trying to make this MappedField subclass work… and then received approval to choose an approach other than CRUDify. Part of the mission for this little app was to learn some things about what to do and what not to do with Lift, and I think we’ve accomplished that part of the mission now. 🙂

    However, if this research and sample code helps out someone else down the line later, then that would be great.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thrown together a quick prototype to try and establish a few very
Today I have just thrown together this PowerShell script which takes a tab-delimited text
I have three methods that, together, save a node to the database. Currently, this
I have something pretty simple which I've thrown together. I have a little form
I have been having some trouble lately with using custom classes as types. As
I have a date in the following format: 2010-03-01T00:00:00-08:00 I have thrown the following
I have an exception being thrown from a C# method, that takes a generic
I have a page on which I've thrown a LinqDataSource and a GridView. I've
I have a HttpModule in C# 2.0 which handles exceptions thrown. Whenever the exception
Does anyone have any tips for dealing with ConstraintExceptions thrown by XSD datasets? This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.