Reputation: 275
How to enforce slick to add schema name in generated query so that it works with different db users.
I have two users one have all privileges while other is read only. I have granted select on user 1's tables to user 2.
But, on running query in Slick, encountered error ORA-00942: table or view does not exist.
Please suggest.
Upvotes: 3
Views: 424
Reputation: 275
Figured it out. Table allows to pass schema name as given below
abstract class Table[T](_tableTag: Tag, _schemaName: Option[String], _tableName: String)
Example
class InstrumentType(tag: Tag) extends
Table[String](tag,Some(SCHEMA_NAME), TableName)
Upvotes: 4