-
Notifications
You must be signed in to change notification settings - Fork 110
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
Problem with combined pk #31
Comments
Please provide the detail exception info |
I was having the exact same issue. To reproduce, create an entity with a composite primary key of 2 strings properties: class MyObject() Define the primarykey with : Autohistory is working fine when adding (as the RowId is empty), but raising an exception on delete (and I suppose any other modifications). This is because the default RowIdMaxLength is setup to 50 (smaller than the expected key). @fuzolan the solution is to raise the RowIdMaxLength in AutoHistoryOptions to match your app need. Edit: I would say that @xyting you could add a note on the wiki about composite primary key and close this issue. |
Yes, have some issues about composite primary key, but I think maybe have any solution can solve this issues |
Does Autohistory not currently support composite keys? I cannot get any tables with them to push history. If you have a fix, is this going to be put in place soon, or should I adjust my tables instead? |
i also have this issue, for about 8 months now. and oddly, after i refactored these tables to have single column primary keys they are still being excluded from the autohistory. And it is passing through the same .EnsureAutoHistory() fxn as the rest. Any tips @xyting ? |
If you use a combined pk then there is an issue that you can not delete those rows. you can create it and they will be no record in history table. But a remove returns in an error. Tested with mssql.
The text was updated successfully, but these errors were encountered: