-
Notifications
You must be signed in to change notification settings - Fork 568
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
[BUG] Install with PostgreSQL in Docker error: Object reference not set to an instance of an object at RewriteName(String name) #4770
Comments
FYI: #2091 was used as a basis |
Does this error only occur in the Docker configuration, or does it occur in other configurations as well (ie. a basic local installation without Docker)? |
After running Oqtane through IIS Express in Debug mode, so without docker, the error occurred as well. |
I see a reference in the error message to AddForeignKey() and there was an enhancement submitted by @Hypnodude in the 5.2.4 release to support PrincipalSchema when creating foreign keys (#4726) - so I am now wondering if this may have caused a regression issue in the PostgreSQL database provider. |
@pollux I am able to reproduce this problem... and I can confirm that it was caused by PR #4726 BaseEntityBuilder calls: AddForeignKey(table, foreignKey); Which calls the following method:
The foreignKey.PrincipalSchema was added in 5.2.4 and its value is null which causes RewriteName() to throw a null reference exception when installing on PostgreSQL. It does not happen on other databases because they do not have a custom RewriteName() method - only PostgreSQL requires this because of its snake case naming convention for objects. |
fix #4770 - set a default value for PrincipalSchema to ensure backward compatibility
Oqtane Info
Version - 5.2.4
Render Mode - Static
Interactivity - Server
Database - PostgreSQL
Environment Info
27.2.0, build 3ab4256
v2.29.2-desktop.2
4.34.2 (167172)
Describe the bug
When installing Oqtane with a PostgreSQL database the installer runs into an error.
When doing the same with a Microsoft SQL Server it works.
Error:
Expected Behavior
The Installer not running into an error.
Steps To Reproduce
Anything else?
Dockerfile
Docker Compose - Microsoft SQL Server
Docker Compose - PostgreSQL
The text was updated successfully, but these errors were encountered: