Note that there are some explanatory texts on larger screens.

plurals
  1. POLeft Join with scalaquery on sqlite
    text
    copied!<p>I'm using scalaquery on a sqlite database (with the <a href="http://www.zentus.com/sqlitejdbc/" rel="nofollow">zentus jdbc driver</a>), but when I select with a left join, I got the following Exception :</p> <pre><code>Caused by: java.sql.SQLException: unrecognized token: "{" at org.sqlite.DB.throwex(DB.java:288) at org.sqlite.NativeDB.prepare(Native Method) at org.sqlite.DB.prepare(DB.java:114) at org.sqlite.PrepStmt.&lt;init&gt;(PrepStmt.java:37) at org.sqlite.Conn.prepareStatement(Conn.java:231) at org.sqlite.Conn.prepareStatement(Conn.java:224) at org.scalaquery.session.Session$class.prepareStatement(Session.scala:25) at org.scalaquery.session.BaseSession.prepareStatement(Session.scala:92) at org.scalaquery.StatementInvoker.results(StatementInvoker.scala:59) ... </code></pre> <p>My query is :</p> <pre><code>val qSong = for{ Join(song,score) &lt;- Songs leftJoin Scores on (_.hash is _.hash) __ &lt;- Query orderBy song.title } yield song.title ~ song.difficulty ~ song.level ~ song.mode ~ score.perfect ~ score.great </code></pre> <p>And when I print the generated query, it give me this :</p> <pre><code>SELECT "t2"."title","t2"."difficulty","t2"."level","t2"."mode","t3"."perfect","t3"."great" FROM {oj "song" "t2" left outer join "score" "t3" on ("t2"."hash"="t3"."hash")} ORDER BY "t2"."title" </code></pre> <p>It's seems it comes from the <code>{oj</code> part that's the driver doesn't handle. So is there a way to make a left join without the <code>oj</code> keyword ? Or is there another driver which handle it ?</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload