Page 1 of 1

parameter'returnId' not found

Posted: Fri 04 Jan 2019 15:11
by sglqh
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?

Re: parameter'returnId' not found

Posted: Fri 04 Jan 2019 16:54
by MaximG
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

Posted: Sat 05 Jan 2019 03:36
by sglqh
My problem has been solved

Re: parameter'returnId' not found

Posted: Thu 11 Apr 2019 21:26
by feuerholt
I would be very nice, if you submit your solution for all other users!

Re: parameter'returnId' not found

Posted: Fri 26 Apr 2019 13:48
by MaximG
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

Posted: Wed 15 Jul 2020 07:30
by sglqh
Using Attribute Mapped Entities is normal.

Re: parameter'returnId' not found

Posted: Wed 15 Jul 2020 16:08
by MaximG
All these changes are available in the latest version of EntityDAC 2.4.1 15-Jun-2020

Re: parameter'returnId' not found

Posted: Sun 23 Aug 2020 11:22
by darnocian
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...

Re: parameter'returnId' not found

Posted: Fri 28 Aug 2020 09:58
by MaximG
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.