parameter'returnId' not found
parameter'returnId' not found
var
Icon:TIcon;
Query: ILinqQueryable;
begin
Icon := DataModule2.EntityContext1.CreateAttachedEntity<TIcon>;
Icon.Id :=1111;
Icon.Filename:='asdaaaaa';
Icon.Upname :='dddfd';
Icon.Upda :=VarToDateTime('05-10-14 04:35PM');
Icon.Save;
I am studying EntityDAC,execute the above code prompt "parameter 'returnId' not found", can not be saved, what is the reason?
Icon:TIcon;
Query: ILinqQueryable;
begin
Icon := DataModule2.EntityContext1.CreateAttachedEntity<TIcon>;
Icon.Id :=1111;
Icon.Filename:='asdaaaaa';
Icon.Upname :='dddfd';
Icon.Upda :=VarToDateTime('05-10-14 04:35PM');
Icon.Save;
I am studying EntityDAC,execute the above code prompt "parameter 'returnId' not found", can not be saved, what is the reason?
Re: parameter'returnId' not found
Thank you for the information, however, it's not enough to reproduce the issue. What DB are you using in this case? Please compose and send us a simplest sample, execution of which causes the issue. In addition, we will need the model (*.enml) and the DDL script to create tables used in this sample. For your convenience, please use the e-support form (https://www.devart.com/company/contactform.html).
Re: parameter'returnId' not found
My problem has been solved
Re: parameter'returnId' not found
I would be very nice, if you submit your solution for all other users!
Re: parameter'returnId' not found
Currently, we are working on the release of a new build of our product that would include all the changes required for elimination of the issue you described. As soon as we complete this work, the build will be available to all users.
Re: parameter'returnId' not found
Using Attribute Mapped Entities is normal.
Re: parameter'returnId' not found
All these changes are available in the latest version of EntityDAC 2.4.1 15-Jun-2020
Re: parameter'returnId' not found
Latest update didn't work for me as was assuming an underlying bug somewhere. However, I figured out what the problem was.
I had a postgresql db with a table with an id of type serial (an auto_increment type on postgres). With EntityDeveloper, it refelected the column correctly. However, it kept on returning the 'returnId'... seeing this is actually a bit confusing at first because 'returnId' was nowhere to be found... tracing the code, it was actually obvious that my field 'Id' which was the primary key which would be populated during the insert was the problem, and 'returnId' was just something the entitydac layer was manufacturing. I updated the annotation to [Column('id', []), Generator(gtTable)] ... and issue was sorted.
So ideally the error message could be more specific to reference the actual field name 'id' rather than the internal variation... and possibly a hint to validate that a Generator might need to be used...
I had a postgresql db with a table with an id of type serial (an auto_increment type on postgres). With EntityDeveloper, it refelected the column correctly. However, it kept on returning the 'returnId'... seeing this is actually a bit confusing at first because 'returnId' was nowhere to be found... tracing the code, it was actually obvious that my field 'Id' which was the primary key which would be populated during the insert was the problem, and 'returnId' was just something the entitydac layer was manufacturing. I updated the annotation to [Column('id', []), Generator(gtTable)] ... and issue was sorted.
So ideally the error message could be more specific to reference the actual field name 'id' rather than the internal variation... and possibly a hint to validate that a Generator might need to be used...
Re: parameter'returnId' not found
We're glad that the issue has been resolved. Please send us a DDL script for creating that table and the model file (*.enml) -- we'll test our product. You can use the form on our website (https://www.devart.com/company/contactform.html) to send the files.