Hi,
I’ve a big problem on my createOrganizationAfter trigger. I want to connect a stripe user to an organization.
Unhandled error: {"message":"Records for current filter not found","locations":[],"path":["stripeCustomerCreate"],"code":"EntityNotFoundError","details":{"organization":"Record for current filter not found."}}
The thing is that it putting me this error. Is this something with the one-to-one relation wich has been changed recently ?
The field org does really exist in my stripeCustomer schema. The trigger is working on local but not on production…
This is quite urgent. If someone or the support can help.
Hi @ronan!
Its Igor from 8base
Can you please share your trigger source code?
One important note: It is not advisable to use triggers in order to create other entities or change the current and others, because it may cause unpredictable side effects and locks of database (docs reference)
You can move your logic to Resolver and make the steps sequentially like this:
Hi ! Thanks for you reply ! it worked…
Could you tell me what’s the reason 8base deleted the one-to-one relationship ?
To me it was very usefull, I don’t know how to do instead…
@ronan We released a big update to our database to improve performance. Conceptually, relational databases do not support 1 to 1 relationships. So we removed this feature
But you can still create a kind of 1-to-1 relation:
Create a new relation field in the table
Go to Table Settings (Setting Icon near the Data tab)
Press “Add Index”
Choose your relation and give it a name
Select “Unique Index”
It will guarantee that the field will have only one relation