Skip to content
This repository was archived by the owner on Jan 17, 2022. It is now read-only.
This repository was archived by the owner on Jan 17, 2022. It is now read-only.

Foreign key for MultiDBCake example #22

@suriyanto

Description

@suriyanto

I followed the MultiDBCake example to be able to get different databases used between testing and production. In the table definition, I would like to set foreign key between Users and Pictures, which should be similar to below.

def pictureKey = foreignKey("FK_USER_PICTURE", pictureId, PictureComponent.Pictures)(_.id.get)

However due to the fact that the Pictures object is inside PictureComponent trait, there is no way for me to reference PictureComponent.Pictures. What will be your suggestion on adjusting this example to be able to achieve this?

Thanks,
Suriyanto

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