-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Multi Schema - Generate intermediate tables. (Postgres) #2690
Comments
Well I was messing around with the code. And it seems I have a fairly simple solution. I'll see if I can send the PR tomorrow. But I don't know if that code is in the right place though. |
We should probably respect the parent entity This might need more changes elsewhere (probably in the |
There is a helper method called edit: the problem is indeed in the |
I understand what you mean. I'll be checking it out, thanks. |
Well after finishing some work things I was able to return to this topic. Sorry for the delay. I enclose a screenshot, the only thing I did was invert that line and with that it works in both cases. Cases I have tried.
|
No worries, I am already dealing with this. |
I did not want to stop mentioning that what I commented previously had solved both cases. I reckon you found something else to look at in detail. |
Describe the bug
First of all I want to thank and congratulate for this incredible ORM.
I am testing the option of using the schemas separately.
The problem I am having right now is that when creating a schema and generating the tables it does not generate the intermediate tables. Traditionally, of course, I haven't had a problem with that.
On the other hand, I don't know if it's a bug or if I'm actually missing something in the code.
To Reproduce
This is the code I have.
I have the user schema with the wildcard so I can use it in any schema dynamically. I also have a relationship from N to M to roles. And for some reason it does not create the intermediate table.
UPDATED
Writing this I realized that by adding the wildcard in the role field of the user schema:
I have a partial solution since it creates the intermediate table but not the indexes.
Stacktrace
Expected behavior
The behavior I expect is that it doesn't fail to create the indexes and that the wildcard correctly replaces each schema.
Additional context
It does not replace the schema name in the query when you use references at the end of the query.
alter table "tenant5"."users_has_roles" add constraint "users_has_roles_user__id_foreign" foreign key ("user__id")
references ."users" ("_id")
on update cascade on delete cascade; - syntax error at or near ""
Sorry if it's a little messy, it's the first time I'm reporting.
Versions
The text was updated successfully, but these errors were encountered: