soc
soc

Reputation: 28443

How to define primary keys and foreign keys in Slick's direct embedding?

I'm playing with Slick and want to build an example application with a few tables. These tables are of course related in some ways with each other. I looked into the documentation, but I haven't found any information on it: http://slick.typesafe.com/doc/2.0.0-M3/direct-embedding.html#row-class-and-schema

Consider the following tables:

case class Coffee(
  name: String,
  price: Double,
  producerId: ???
)

case class Producers(
  name: String,
  coffeeIds: ???
)

case class Customers(
  name: String,
  orderIds: ???
)

case class Orders(
  coffeeId: ???,
  amount: Int
)

I marked the foreign-key relationships which I'd like to express with ???.

Upvotes: 0

Views: 195

Answers (1)

cvogt
cvogt

Reputation: 11270

Not supported at the moment. The direct embedding is currently on ice in favor of stabilization and documentation.

Upvotes: 1

Related Questions