-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL: Referencing data on another schema #145
Comments
@Hgmoa , Exposed doesn't support cross-schema interaction atm, but you can try to add schema to table name. I'm not sure that it will work, but plz give it a try and tell me if it helps you. object Foo : IdTable("Schema.Foo) {}
object Bar : Table {
val foo by optReference("foo", Foo)
} |
@Hgmoa , any news? Was it possible to find any workaround for you problem with cross-schema relationships? |
I need to use another schema than public. Is there any way to do it atm? |
You may try this and leave feedback if that helps. |
@Tapac I tried your suggestion and it worked fine for me, i was able to join tables from different schemas |
I wrote table name like schema.table in table name, and it worked fine! It worked) tested on PostgreSQL |
First of all sry due to English not being my first language.
Am I able to do REFERENCES ,JOINS and other operations in between schemas with this framework?
I´m trying to wrap my head around it but I can only create tables in different schemas using this bit of code just before the create operation
fun Transaction.setSchema(schema: DatabaseSchemas){ exec("set SEARCH_PATH TO \"$schema\"") }
transaction { setSchema(DatabaseSchemas.XXXXXXX) createMissingTablesAndColumns(UsersTable) }
where DatabaseSchemas is an Enum of all My Schemas (done this way for ease of use)
The text was updated successfully, but these errors were encountered: