[Feature] Map database fields from existing tables with field-level dbName
option.
#13640
samuelsogbesan
started this conversation in
Feature Requests & Ideas
Replies: 2 comments
-
This is also an issue with fields that aren't defined in snake case. Payload automatically turns field names to snake case before performing the database query. e.g.
Would execute in SQL as:
The quickest solution would be to let developers override the behaviour. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have a PR here that I'll need to continue #10293 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team.
Feature Request / Proposed Solution
The ability to supply a
dbName
per field in aCollection
. Payload will use thisdbName
during lookup, instead of using the name of the field in the collection.Problem
We have an existing database that we want to partially expose to Payload via a series of Collections. This includes our
User
table, which has a different schema to the one that is expected by Payload.The
CollectionConfig.dbName
option allows us to point Payload to the right database schema, but we are not able to map the fields. So we have some mismatches, for fields like id, password etc.Our final goal is to allow login to the Payload platform, using the partners existing credentials.
Beta Was this translation helpful? Give feedback.
All reactions