A valid changelogDate is required to parse. JHIPSTER Date field - jhipster

I am facing an issue while creating an Entity from the <Entity>.json file using command
jhipster entity Customer --skip-install --force
My .json file changelogDate and fieldType is as below
"changelogDate": "1631210561484","fieldType": "LocalDate",
It's showing the below error
Error: Copying template C:\Users\dsamarli\AppData\Roaming\npm\node_modules\generator-jhipster\generators\entity-server\templates\src\main\resources\config\liquibase\fake-data\table.csv.ejs failed.
A valid changelogDate is required to parse.
When I update the json after removing the dateOfBirth field, it works fine.
where changelogDate is being used for date field type. I am not sure why the changelogDate present in my json file is not valid. I am generating it via this line "" + new Date().getTime()

Related

How to get contents of a single file uploaded via Microsoft Forms using 'File Identifier'?

Desired Behaviour
Upload file using Microsoft Forms
Get file content
Create new file in new location
Delete original file
Actual Behaviour
I am getting error at step 2:
"body": {
"status": 404,
"message": "File not found\r\nclientRequestId: yadda-yadda\r\nserviceRequestId: yadda-yadda"
}
What I've Tried
In the Power Automate flow, the trigger is:
When a new response is submitted
The next action is:
Get response details
The Raw Outputs of this last action is essentially:
"body": {
"responder": "me#domain.com",
"submitDate": "7/5/2021 3:17:56 AM",
"my-text-field-01": "text string here",
"my-file-upload-field-01": [{.....}],
"my-file-upload-field-02": [{.....}],
"my-text-field-02": "text string here"
}
The file upload fields have this schema:
{
"name": "My File Name_Uploader Name.docx",
"link": "https://my-tenant.sharepoint.com/sites/my-team-site/_layouts/15/Doc.aspx?sourcedoc=%7B0F1C3107-32C9-4CEF-B4BA-87E57C9DC514%7D&file=My%20File%20Name_Uploader%20Name.docx&action=default&mobileredirect=true",
"id": "01NSAULIQHGEOA7SJS55GLJOUH4V6J3RIU",
"type": null,
"size": 20400,
"referenceId": "01NSAULISZJG7M56NSV5AIDUQFHG3BOBCH",
"driveId": "letters-and-numbers-here",
"status": 1,
"uploadSessionUrl": null
}
Strangely, the id or referenceId values in this object do not correspond with the Document ID that is displayed when looking at the document's properties in the SharePoint document library:
Anyhow, I can target the uploaded file properties with these expressions in the flow:
json(body('Get_response_details')?['random-letters-and-numbers'])[0]['name']
json(body('Get_response_details')?['random-letters-and-numbers'])[0]['driveId']
json(body('Get_response_details')?['random-letters-and-numbers'])[0]['id']
The next action I want to take is Get file content.
It seems this can be done via the following actions:
SharePoint Connectors
Get file content
Get file content using path
OneDrive for Business Connectors
Get file content
Get file content using path
I'd like to use Get file content (as it seems more dynamic than having to pass through a hardcoded path).
Several posts suggest the value I pass through to this action as the File ID should be a concatenation of driveId and id, ie:
driveId.id
Sources:
Move, rename a file submitted in a Microsoft Form
Working with files from the Forms "File Upload" question type
However, when I try the following:
I get the error:
"body": {
"status": 404,
"message": "File not found\r\nclientRequestId: yadda-yadda\r\nserviceRequestId: yadda-yadda"
}
Question
What should I be passing into Get file content as the File Identifier?
Edit 1
After reading this, perhaps File Identifier actually refers to a 'file path', ie:
/Shared Documents/Apps/Microsoft Forms/My Form Name/Question/My File Name.docx
Ergh, I tried the path above as the File Identifier (by using the UI to manually select the file) and it works - not sure how I can create it dynamically as passing in a dynamic file name does not work:
/Shared Documents/Apps/Microsoft Forms/My Form Name/Question/#{variables('file_upload_wor_document_name')}
Edit 2
The last code snippet works as File Identifier when using SharePoint's Get file content using path connector.
Would still appreciate any clarification on all the different types of id that are referred to in SharePoint/Power Automate/MS Graph etc and why driveId.id was suggested as the value to use in some places.
I am finding not having access to the relevant file id at different times is problematic, eg the Delete file action requires File Identifier to delete the file uploaded to Microsoft Forms - and I don't have access to that from the Get response details response.
You may find what you need by first getting the file metadata. When working with files uploaded through forms I sometimes use the following steps:
Parse JSON for the question related to the uploaded file(s).
Get File Metadata (in my example, using path)
Now you have the details for doing what you want. In my example to create a table in the uploaded XLXS file for other uses.
Example: Getting file metadata from MS/Forms Upload

The entity User is not key value coding-compliant for the key "dateEndSubscription"

I have a swift project with 3 entities in my xcdatamodeld: Access, CustomerInfo and User. I am trying to save the dateEndSubscription separately in the User. When I am trying to save , I get error as : Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: the entity User is not key value coding-compliant for the key "dateEndSubscription".' Anyone please help to solve it in swift4.
The json message contains the key dateEndSubscription but the attribute in your User entity is named dateEnd so they doesn’t match.
A few options to solve this in your saveUser method
Change API.DateEnd to dateEnd but maybe that will infer with the decoding of the json message.
Don't use API key but instead hardcode attribute name
user.setValue(dateEnd, forKey: "dateEnd")
and lastly use the property of the User class directly
user.dateEnd = dateEnd
You need to change saveCustomerInformation as well since you are working with a User object there as well although it's unclear why.

While querying for custom types file in cmis getting error

First I was trying with this code to get all properties of custom type file in my repository. Object Id is of type mcl_engineer. Unable to read custom types file and getting exception.
CmisObject objectt = session.getObject(session.createObjectId("09027bd480031032"));
Document document = (Document)objectt;
System.out.println(document.getProperties())
While querying also getting exception.
SELECT *
FROM cmis:document
WHERE cmis:objectId = '09027bd480031032'
While querying getting this error
CMIS Exception: runtime Internal Server Error
Error Content: Status code: 500[runtime] Failed to get property info for type: mcl_engineer [E_CANT_INIT_PROPERTY_INFO_CACHE] Cant initialize PropertyInfoCache: mcl_engineer category. You must provide a table owner name qualification on your reference to table mcl_category. [DM_QUERY_E_REG_TABLE_QUAL] You must provide a table owner name qualification on your reference to table mcl_category. (CMIS with REST-Atom binding)
Only getting error for custom type file not for default one. So please help me out.
Thanks in advance.

Server error when sorting generated entity with field name with underscore

I am getting error.internalServerError when sorting generated entity in generated table view. It leads to error only in case of fields with database names with underscore. For example project_owner.
In my console I am getting this:
GET http://localhost:9000/api/projects?cacheBuster=1489187431846&page=0&size=20&sort=image_logo_url,asc&sort=id 500 (Internal Server Error)
Is it a bug, or only my local problem?! Thanks.
The problem is in wrong parsing. See this URL for more information:
https://jira.spring.io/browse/DATACMNS-816
I thought, that when I generate field with name project_owner, it will be stored as project_owner, but entity name will be camelCase -> projectOwner.
So If you have the same issue, check your entity names and refactor them to camelCase syntax.

yii2 excel import using arogachev plugin

I am importing excel with column name FirstName, LastName and Username. Username is unique in db and model validation both. I am trying to import excel which has 2 row with same username.
It throws below error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'a#2.com' for key 'username'
But this error should not come as before importing excelsheet there is no such value in DB. And model validation should detect duplicate value.
Please help
Turns out that there was a bug in basic import with this type of validation because the validation needs to be performed after previous models were saved.
I fixed this and released new version.
Please update to the latest version using command:
composer update arogachev/yii2-excel

Resources