darian
Explore posts from serversNextjs redirect to localhost instead of domain
I've deployed several Next.js applications on Railway, but I recently encountered this odd behavior with
Response.redirect
. Strangely, it redirects to localhost instead of the configured domain. I'm wondering if this issue is related to the latest Next.js update or perhaps with the Railway Edge Proxy.
I created a clean new Next.js app for testing, and the problem persists. However, when I deployed it to other platform like Vercel, the issue disappeared.
Link to original issue with reproduction:
https://help.railway.app/questions/next-js-route-handler-is-returning-local-683ba64f#p-56 replies
DTDrizzle Team
•Created by darian on 6/24/2024 in #help
Defining disambiguating one-to-one relational query
I'm working with a schema that involves one-to-one disambiguating relationships, and I'm encountering an issue when trying to define these relationships concisely. Here's a simplified version of my schema:
Ideally, I'd like to define the relationships in Transfer by just specifying the relationName, similar to this:
However, this approach results in a type error, suggesting that specifying only the relationName is not sufficient.
The current workaround involves specifying the fields and references explicitly, which makes these fields required:
Similarly, one-to-many has solution for this https://orm.drizzle.team/docs/rqb#disambiguating-relations
My question is: Is there a way to define these one-to-one disambiguating relationships in Drizzle without making the fields required, preferably using just the relationName? If not, are there any plans to support this kind of concise relationship definition in the future?
4 replies