I have started my first project in Scala and ScalaQuery. So far both are looking good and promising though I am having little difficulty once in a while.
Can someone please explain me how to get a class object (in this case Domain case class having around 12 columns) instead of tuples. Below query is returning tuples but the problem is I need around 9 columns(or all columns) of the table without providing each column name in the query yield. Domain class already has * defining all columns then why would the query below is returning tuples instead of Domain object so that I can use Domain.name, Domain.level instead of figuring the position in tuple returned.
val ext_id = 'ns1.amazon.com'
val name = "www.getcrazy.com"
val validDomains = for {p <- Domain where { p => (p.ext_id is ext_id) && (p.domain_name is name) && (p.is_deleted is false) && (p.result_code is "1000")}} yield *
for(pp <- validDomains) {
logger.debug("State is " + pp._6 + " for domain ID - " + pp._1)
}
Any suggestion?
Thanks, Pawan