Questions tagged [squeryl]

Squeryl is a strongly typed, declarative and SQL like DSL for manipulating database objects from within the Scala language.

Squeryl is a strongly typed, declarative and SQL like DSL for manipulating database objects from within the Scala language.

201 questions
0
votes
1 answer

"not found: value account" While using squeryl and Scala

I'm trying to make it so I can get a value from one model into the creation of another model. This is very simplified but gives the error I'm having with a model instance extending a squeryl model. In reality I'm doing some calculations specific to…
Oscar Godson
  • 31,662
  • 41
  • 121
  • 201
0
votes
0 answers

Comparing Case Class Instances with Squeryl?

How can I properly evaluate case class instances in squeryl? $cat build.sbt scalaVersion := "2.11.8" libraryDependencies += "org.squeryl" %% "squeryl" % "0.9.5-7" $sbt console scala> case class Foo(x: Int) extends…
Kevin Meredith
  • 41,036
  • 63
  • 209
  • 384
0
votes
1 answer

How do I ensure a date is stored as UTC?

I have a date column in my Oracle 11g RDBMS called changed_utc. How do I make sure that the the changedUtc field from my Squeryl schema is stored as UTC instead of the local timezone of the database? As much as I would like to I cannot change the…
Gabriel
  • 1,679
  • 3
  • 16
  • 37
0
votes
3 answers

How to use max function in SQL

I am trying to write a query to find the top sales person in the shop and trying to Display the employee name, the shop where he/she is employed and the value of sales. I only want to output the employee with highest number of sales at the moment,…
J.Dave
  • 67
  • 2
  • 6
0
votes
1 answer

Change Oracle CURRENT_SCHEMA via Squeryl

I have a Squeryl connection to an Oracle database. How do I change the CURRENT_SCHEMA setting upon connecting? In raw sql this would be done with ALTER SESSION SET CURRENT_SCHEMA= How do I do this via Squeryl?
Gabriel
  • 1,679
  • 3
  • 16
  • 37
0
votes
1 answer

Scala ORM producing incompatible version build errors

We have a working Scala application, using Scala 2.11.5. org.scala-lang scala-library 2.11.5 When we introduce SORM, using the following maven…
user1052610
  • 4,440
  • 13
  • 50
  • 101
0
votes
1 answer

Scala/Play/Squeryl Retrieve multiple params

I have the following url : http://localhost/api/books/?bookId=21&bookId=62?authorId=2 I want to retrieve all the bookId values with Scala and then use Squeryl to do a fetch in a the database. I'm using the PlayFrameWork as the WebServer, so here's…
user708683
  • 500
  • 3
  • 9
  • 26
0
votes
1 answer

Composite key and where in in squeryl

How can I write deleteWhere clause in squeryl for entity with composite id? val list: List[CompositeKey2[Long, Date]] = existing.map(x => x.id).toList Schema.entities.deleteWhere(q => q.id in list) Error:(82, 49) value in is not a member of…
npmrtsv
  • 434
  • 6
  • 22
0
votes
1 answer

How can I delete multiple entities with squeryl?

I know how to delete one entity, but when I try to delete list with entities: val songs = List(song1, song2) songsQuery.delete(songs) I've got this: Error:(77, 28) Cannot prove that com.logic.domain.entity.Song <:<…
npmrtsv
  • 434
  • 6
  • 22
0
votes
1 answer

Squeryl - "CustomTypesMode is not a member of package org.squeryl.customtypes"?

I've built Squeryl framework with SBT and am trying to use it with Scala 2.8 and NetBeans 6.9. I've defined an entity model as it is desctibed in Squeryl intro, but the IDE and compiler complain that "CustomTypesMode is not a member of package…
Ivan
  • 63,011
  • 101
  • 250
  • 382
0
votes
0 answers

Squeryl, inhibitWhen function doesnt seems to work

Im using Squeryl with the function inhibitWhen to ignore a Where clause when a scala value is Empty. I tried this code but Squeryl still checking for the where clause that i want to ignore! (l.book_id in…
user708683
  • 500
  • 3
  • 9
  • 26
0
votes
0 answers

Squeryl and scala : fetch by multiple values using the in clause

I'm using scala to get my values from the following url : ?booksId=1,4,6&autorId=2 To retrieve the booksid values i did this : params.get("booksId") and the output of this is : Some(1, 4, 6). Some is the function added by Scala !! So what i want is…
user708683
  • 500
  • 3
  • 9
  • 26
0
votes
1 answer

Squeryl relation 1:N

I experienced some troubles with Squeryl ORM. Very basic functionality like select or insert rows without relations works fine, problems begin when I try to get data with relation 1:N in trivial scenario. In test DB I create two tables Questions and…
Greebo
  • 13
  • 2
0
votes
2 answers

How to resolve error "Cannot resolve symbol ==="

I have a simple CRUD project in scalatra and as ORM I use squeryl. I want to create some tables which are in relation each other. On this line: val questionToAnswer = CustomTypesMode.oneToManyRelation(questions,answers) via ((q,a) => q.id ===…
Filosssof
  • 1,288
  • 3
  • 17
  • 37
0
votes
1 answer

Using Squeryl inside a OSGi container

Has anyone successfully gotten Squeryl to work inside a OSGi environment, specifically on Karaf 3.03. So far I have gotten the individual dependencies to load, scala libraries, squeryl and the jdbc driver.The installed bundles look something like…