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

  • Home
  • SEARCH
  • 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 8698543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:45:14+00:00 2026-06-13T01:45:14+00:00

From the Lift-Web Mapper model below, how do I access the fields under AssignmentformLink?

  • 0

From the Lift-Web Mapper model below, how do I access the fields under AssignmentformLink?

object TForm extends TForm with LongKeyedMetaMapper[TForm]

class TForm extends LongKeyedMapper[TForm] with IdPK with ManyToMany {
  def getSingleton = TForm

  object label extends MappedString(this, 40)

  object pattern extends MappedString(this, 200)

  object assignments extends MappedManyToMany(
      AssignmentformLink, AssignmentformLink.assignment, AssignmentformLink.form, TForm)

}

object AssignmentformLink extends AssignmentformLink with LongKeyedMetaMapper[AssignmentformLink] {
  override def dbIndexes = Index(form, assignment) :: super.dbIndexes
}

class AssignmentformLink extends LongKeyedMapper[AssignmentformLink] with IdPK {
  def getSingleton = AssignmentformLink

  object form extends MappedLongForeignKey(this, TForm)

  object assignment extends MappedLongForeignKey(this, Assignment)

  object order extends MappedInt(this)

  object readonly extends MappedBoolean(this)

  object required extends MappedBoolean(this)

  object visible extends MappedBoolean(this)

}

object Assignment extends Assignment with LongKeyedMetaMapper[Assignment]

class Assignment extends LongKeyedMapper[Assignment] with IdPK with ManyToMany {
  def getSingleton = Assignment

  object id_parent extends MappedLong(this)

  object label extends MappedString(this, 40)

  object order extends MappedInt(this)

  object guard extends MappedString(this, 200)

  object forms extends MappedManyToMany(
      AssignmentformLink, AssignmentformLink.assignment, AssignmentformLink.form, TForm)

}

To get an assignmet and the forms linked to it, you do this:

val assignments = Assignments.find(By(Assignment.id, 123))

assignments match {
  case Full(as) => {
    val forms = as.forms
.....

But I have no idea how to navigate to the order, readonly, required... fields under AssignmentformLink.

I realise I can search for the link manually, ie. AssignmentformLink.find(By(form...),By(assignment...)), but this will result in inefficient code and really misses the point of using objects.

I need to be able to navigate from the form to the link table’s fields.

  • 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-06-13T01:45:15+00:00Added an answer on June 13, 2026 at 1:45 am

    Don’t know if this is the correct approach, but assignments.joins returns a list of the join table records.

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

Sidebar

Related Questions

I'm running through setting up my first lift web-app from Lift in Action. When
I am porting a legacy system from rails into lift. It has a lot
I need to lift the YouTube link from some text which looks like this:
A standard Symply Lift RestHelper example project features code , code.lib and code.model and
I'm developing a web app with Lift Framework , GlassfishV3 and there is a
I'm intending to access DB (postgre) from my applications in scala. I was requested
I have a exception from lift-json when I want to deserialize a json string.
I will use slightly modified Listing 4.7 from the book Exploring Lift to ask
I'm looking for an object oriented web framework to develop Ajax applications in Scala.
I've watch Harry Heymann, from Foursquare, gave a presentation on Lift to BASE usergroup.

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.