Skip to content

Construct the class with different constructor. #339

@thinksource

Description

@thinksource

I use slick 2.0.1

My case class is:

   case class IdentityId(userId: String, providerId: String)
   case class IdentityItem (
   userId:String,
   providerID: String,
   ....
   ){
   def identityId=IdentityId(userId,providerID)
  }

userId is the foreign key of user table, providerID is the foreign key of provider table, for avoid composite primary keys, I decide add another column name identityId.

you should know that in default slick use only constructed field as the datatable column. In this case I want to use additional column "identityId".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions