Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] DAO - Entity id passed as String when it is Integer #3206

Open
iliyan-velichkov opened this issue Jan 11, 2024 · 1 comment
Open

[API] DAO - Entity id passed as String when it is Integer #3206

iliyan-velichkov opened this issue Jan 11, 2024 · 1 comment

Comments

@iliyan-velichkov
Copy link
Contributor

iliyan-velichkov commented Jan 11, 2024

Entity id passed as String when it is Integer.
Entity:
image
Received message:

{
    "operation": "update",
    "table": "CODBEX_SALESORDER",
    "entity": {
        "Id": "15",
        "Store": 0,
        "InvoiceNumber": 0,
        "InvoicePrefix": "INV-2023-00",
        "Comment": "delivery between 9-11",
        "Total": 33.27,
        "Customer": 3,
        "Status": 2,
        "Tracking": "",
        "AcceptLanguage": "en-US,en;q=0.9,bg;q=0.8",
        "DateAdded": "2024-01-10T14:03:57.000Z",
        "DateModified": "2024-01-10T14:03:58.000Z",
        "Currency": 4,
        "Language": 1,
        "$$hashKey": "object:34"
    },
    "key": {
        "name": "Id",
        "column": "SALESORDER_ID",
        "value": "15"
    }
}

Check whether it is an expected behaviour or a bug.

The event is triggered by the generated DAO

exports.update = function(entity) {
	dao.update(entity);
	triggerEvent({
		operation: "update",
		table: "CODBEX_SALESORDER",
		entity: entity,
		key: {
			name: "Id",
			column: "SALESORDER_ID",
			value: entity.Id
		}
	});
};
@iliyan-velichkov iliyan-velichkov changed the title Entity id comes as String when it is Integer Entity id passed as String when it is Integer Jan 11, 2024
@ThuF ThuF added the bug label Jan 11, 2024
@ThuF ThuF changed the title Entity id passed as String when it is Integer [API] DAO - Entity id passed as String when it is Integer Jan 11, 2024
@ThuF ThuF added this to the 10.0.0 milestone Jan 11, 2024
@ThuF
Copy link
Contributor

ThuF commented Jan 11, 2024

It seems that the issue could be related to the DAO API (ORM) and also to the EDM Template (Application Template), as it seems that the entity object is coming from the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

3 participants