How to verify that the entered data is present in the database in laravel - request

How to verify that the entered data is present in the database, if it does not exist, it will be returned with an error message

You can use findOrFail($id). doc : https://laravel.com/docs/9.x/eloquent#not-found-exceptions

Related

TYPO3 Exception: Could not determine pid

While trying to add a new fe_users record, on save I get
(1/1) Exception
Could not determine pid
It's TYPO3 9.5.20.
We already have a lot of entries in multiple folders which could be edited without problem.
But those records were imported (by EXT:ig_ldap_sso_auth or with mysql terminal)
These records are used only to be shown (no login is used).
What configuration is missing or could be wrong?
EDIT:
as #biesior mentioned: the error message does not come from the core but from an extension. It's EXT:solrfal (in version 7.0.0)
The real error was not in EXT:solrfal. this extension just hides the error with a misleading message.
The real reason was a wrong database configuration for the table fe_users. Although it is not possible in SQL to have a default value for fields of type text (and any given value is ignored) TYPO3 expects a default value if it is configured. As this is not returned from the database it assumes an error. And EXT:solrfal hooks into the error handling and assumes a wrong error.
Hi just got the same problem.
The error message was called in solrfal ConsistencyAspect::getRecordPageId() which was called by ConsistencyAspect::getDetectorsForSiteExclusiveRecord(). I remember that I have added various tablenames to siteExclusiveRecordTables of Extension Settings of solrfal. And yes, there was one table without pid. After removing this table from list, deleting files works again.

Track errors in snowflake - Error during validate function in snowflake

Executed a copy command using stage and also direct S3 location in snowflake with ON_ERROR = CONTINUE;
and then used select * from table(validate(test, job_id=>'_last')); to track the error records however i received the following error after execution the validate command "Failure using stage area. Cause: [The AWS Access Key Id you provided is not valid.]"
Could someone please help with error.
Thanks
Retried the same with new setup and its working fine.

Bulk API Error : InvalidBatch : Field name not found : Id

I am trying to update contact records one field - Ext_Id__c via bulk api. We have created the csv file with two columns and there no whitespaces in the header names.
I am creating the job and pushing the batches to the job via a simple java client. the jab and batches are getting created successfully , however it's not updating the contact , instead it's gving below error:
BATCH STATUS:
[BatchInfo id='7512D000000XUV0QAO'
jobId='7502D000000KWQuQAO'
state='Failed'
stateMessage='InvalidBatch : Field name not found : LastName'
.......
..........
numberRecordsProcessed='0'
numberRecordsFailed='0'
totalProcessingTime='0'
apiActiveProcessingTime='0'
apexProcessingTime='0'
]
I have all the neccesary access at field level for both fields. Can anyone please help?
So the issue was that , the csv file which we were uploading was saved using the format - "CSV UTF-8 (Comma Delimited (.csv))" :
See the old Format : 1
and due to this the system wasn't recognizing the first column header as a valid field - not sure why , may be dur to Bulk API V1.0
So as a solution , we saved the file in plain csv format , i.e. - "Comma Separated Values (.csv)" ,
Here is the new format: 2
and this resolved the issue !!!

Error: Unknown duplicates value on record with id

I'm trying to Upsert the data to Account object using an external tool, Everything works fine but Salesforce is throwing error for few records when upserting.
I was doing the upsertion process using the external id field. Except external id field no other field is having a unique constraint.
I'm getting the following error -
SF_ERROR: DUPLICATE_VALUE
OBJ: Account - duplicate value found: unknown duplicates value on record with id: 001***********
Please help me to solve the issue.
This is happening because your trying to create Salesforce contact multiple times with same email and data
It's silly but this was happening to me because SFDC considers 'NULL' as a unique value... Mostly because Excel converted 'NULL' to text and was trying to bring in the literal word 'NULL'.

Binary Column is translated to null Java type

I created a domain in JasperRreports Server. I have a table that stores Binary data. When I use it in my domain I get a the following error :
java.lang.IllegalArgumentException: getObjectType for javaType: null
returned null
I exported the schema and found the following:
<field id="Id" type="java.lang.Integer" />
<field id="FileData" type="null" />
As you can see, null is used in the type field. I tried changing this to java.io.InputStream which is the type that it maps to when I connect to the data source directly and got the same error:
java.lang.IllegalArgumentException: getObjectType for javaType:
java.io.InputStream returned null at
com.jaspersoft.commons.dataset.expr.ObjectTypeMapper.getObjectType(ObjectTypeMapper.java:69)
Any reports using that domain fail to run until I remove the Binary column. When I try to create a Domain report in iReport, it can not retrieve the domain fields. When I try to use the adhoc reporting tool I get the error above.
I am using SQL Server 2005, the type of the data is 'image'. I cast the column to varbinary in my view to see if JasperReports would recognize it and I still have the same error.
Has anyone successfully used binary data types in JasperReports Server domains?
Update: I configured the bean "jdbcMetaConfiguration" in applicationContext-semanticLayer.xml to map the binary column to java.io.InputStream and I still get the same error. The mapping worked, when I view the XML file "null" is replaced with "java;io.InputStream" but I still get IllegalArgumentException.
EDIT: Nope, it cannot be done. Sorry.
Original [overly-optimistic] answer:
The Ad Hoc editor cannot handle images (or other binary data types). It would be nice if it more gracefully ignored them... but it's no surprise that you cannot use them there.
But it should be possible to define the field as some sort of binary (image or array of bytes or just an Object or something like these) and then use it in iReport.

Resources