parameter'returnId' not found

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
sglqh
Posts: 8
Joined: Fri 09 Nov 2018 02:33

parameter'returnId' not found

Post by sglqh » Fri 04 Jan 2019 15:11

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?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: parameter'returnId' not found

Post by MaximG » Fri 04 Jan 2019 16:54

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).

sglqh
Posts: 8
Joined: Fri 09 Nov 2018 02:33

Re: parameter'returnId' not found

Post by sglqh » Sat 05 Jan 2019 03:36

My problem has been solved

feuerholt
Posts: 2
Joined: Thu 11 Apr 2019 21:23

Re: parameter'returnId' not found

Post by feuerholt » Thu 11 Apr 2019 21:26

I would be very nice, if you submit your solution for all other users!

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: parameter'returnId' not found

Post by MaximG » Fri 26 Apr 2019 13:48

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.

sglqh
Posts: 8
Joined: Fri 09 Nov 2018 02:33

Re: parameter'returnId' not found

Post by sglqh » Wed 15 Jul 2020 07:30

Using Attribute Mapped Entities is normal.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: parameter'returnId' not found

Post by MaximG » Wed 15 Jul 2020 16:08

All these changes are available in the latest version of EntityDAC 2.4.1 15-Jun-2020

darnocian
Posts: 5
Joined: Sun 23 Aug 2020 11:07

Re: parameter'returnId' not found

Post by darnocian » Sun 23 Aug 2020 11:22

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...

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: parameter'returnId' not found

Post by MaximG » Fri 28 Aug 2020 09:58

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.

Post Reply