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

StoreGeneratedPattern.Computed [DNET258] #267

Closed
firebird-automations opened this issue Jul 22, 2009 · 3 comments
Closed

StoreGeneratedPattern.Computed [DNET258] #267

firebird-automations opened this issue Jul 22, 2009 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: Hannes Lowette (hanneslowette)

Attachments:
DmlSqlGenerator.7z

System.InvalidOperationException was unhandled
Message=The property 'ID' is part of the object's key information and cannot be modified.
Source=System.Data.Entity

Put the keyfield to StoreGenereatedpattern="Identity" and another field to Computed. This will cause wrong sql generation and it will try to overwrite the pk of an object. raising the above error.

The field F_PERS_ID is the PK and has Identity set
The field CF_PERS_HAS_MEMO is a calculated DB field.

execute block (
p0 VARCHAR(200) character set utf8 = @p0, p1 BIGINT = @p1)
returns (
"F_PERS_ID" BIGINT, "CF_PERS_HAS_MEMO" INT)
as begin
update "T_PERSON"
set "F_PERS_NAME" = :p0
where ("F_PERS_ID" = :p1)
returning "F_PERS_ID", "CF_PERS_HAS_MEMO" into :"F_PERS_ID", :"CF_PERS_HAS_MEMO";
suspend;
end

Commits: 3f8d2e3

@firebird-automations
Copy link
Author

Commented by: Hannes Lowette (hanneslowette)

Possible solution for the problem can be found by replacing the file DmlSqlGenerator

@firebird-automations
Copy link
Author

Modified by: Hannes Lowette (hanneslowette)

Attachment: DmlSqlGenerator.7z [ 11484 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10360 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants