Confusing Data Structure
So , currently i working on NextJS 15 and using AuthJS
when i get a data from xata using
@xata.io/client": "^0.30.1
, the result was
when i try to submit a data , it said Error: invalid record: column [xata_id]: column not found
when i get a data from xata using @xata.io/client@next
, the result was
when i try to submit a data it working fine , but it broke the AuthJS adapter
Also is there any way for disabling the direct access for postgres ? when i create a database there is no swicth for it and auto enabling it.5 Replies
Hi there,
I appreciate this is a confusing error. The
xata_id
column error is a hangover from the non-postgres-enabled database. Some of our operations (such as bulk upsert) expect a xata_id
column, and not id
. We're working on fixing/streamlining this issue.
As for the postgres-enabled database, this is the default and only option moving forward. You cannot disable this feature. If you need the functionality of the non-postgres-enabled database (files columns on the Pro tier, for example) you can disable the Native SQL Table option in the database settings.
great , waiting for the update of column error , thanks.
Could you tell me what method you were using to insert the data? With a code snippet, if possible.
srry, i cant give the code snippet bcs im using AuthJS with Xata Adapter. so i doesnt know which method that the adapter use for inserting data.
but for the others i use,
createOrUpdate
and it working finely without any problems.No problem, makes sense that
createOrUpdate
would work thanks for confirming.