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 9023073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:40:26+00:00 2026-06-16T05:40:26+00:00

found : (Int, String, Option[java.lang.String]) required: (Int, String, Option[java.lang.String]) Pertinent code: object M extends

  • 0
found   : (Int, String, Option[java.lang.String])
required: (Int, String, Option[java.lang.String])

Pertinent code:

object M extends Table[(Int, String, Option[String])]("table") {

  def msaid = column[Int]("msaid", O NotNull)
  def name = column[String]("name", O DBType "varchar(255)")
  def shape = column[Option[String]]("shape")
  def * = msaid ~ name ~ shape

  type T = (Int, String, Option[java.lang.String])

  def apply(msa: T) = 1

  def q() = db withSession { s: Session => (for (r <- M) yield M(*)).list()(s) }
                                                                 ^
                                                                 ^
...

I’ve also tried

  type T = (Int, String, Option[String])

The ultimate goal is that I want all the selected columns to converted into an Object with named accessors, instead of being a tuple.

Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_07).

UPDATE:

Here’s a Gist of the issue (slightly simplified from the above code and eliminates any String/java.lang.String “confusion” by using only Int.)

  • 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-16T05:40:27+00:00Added an answer on June 16, 2026 at 5:40 am

    The error message didn’t use to tell you which was the TupleN, though I think that was improved at some point. The mismatch is between a tuple and n args. Or not.

    The fix is in 2.9.2. I notice your .sbt uses 2.9.1 scalaquery, in case that matters. And isn’t scala-tools.org obsolete? Sorry for half-helping.

    Speaking as a non-user, it looks like a Projection2 is not the Tuple you seek, albeit a Product:

    class Projection2 [T1, T2] extends (Column[T1], Column[T2]) with Projection[(T1, T2)] 
    

    REPLing:

    scala> M.column[Int]("id") ~ M.column[Int]("n")
    res1: (Int, Int) = Projection2
    
    scala> M(res1)
    <console>:23: error: type mismatch;
     found   : (Int, Int)
     required: (Int, Int)
                  M(res1)
                    ^
    
    scala> M.apply
                                    def apply(v: (Int, Int)): Int   
    
    scala> M.apply((1,2))
    res3: Int = 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's declare a def and an equivalent function as a val: scala> def optional(x:Int):Option[String]
I receive the exception Failed to convert property value of type [java.lang.String] to required
I'm getting TypeError: coercing to Unicode: need string or buffer, int found This is
i found this code -(NSString *) genRandStringLength: (int) len { NSMutableString *randomString = [NSMutableString
I found that this C++ code: vector<int> a; a.push_back(1); a.push_back(2); vector<int>::iterator it = a.begin();
I found this code using Google. private int RandomNumber(int min, int max) { Random
I found a very interesting question. When I'm using following code: int main() {
While trying to answer this question I found that the code int* p =
I have found this line of code in a game that I study int
I have this case class define: class Protocol(protocol:String) object Protocol { def apply(protocol:String) :Protocol

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.