Repository navigation
Conversation
A merged set or problem version was not including the version 0 template row from the set_user/problem_user table: the generic keyfield join in the Merge schema matched version_id between the primary (version) table and the lower priority tables, so the template row (version 0) never matched the version row. This is an alternate approach to openwebwork#3308. The problem with that pull request is that specialized code with dealing with the versioned merge should not be in the `WeBWorK::DB::Schema::NewSQL::Merge` base package. It should be handled in the `WeBWorK::DB::Schema::NewSQL::Versioned` package. This keeps the `WeBWorK::DB::Schema::NewSQL::Merge` package generic by delegating each keyfield join term to the primary schema's new merge_keyfield_where method. The Versioned schema overrides it so that the lower priority template tables are matched at version 0 for the version_id field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Actually hold on this and #3308. Both are not right. I am looking at this closer. |
|
Okay, nevermind my last comment. This is right. |
|
Think a different name than |
|
Though I guess it wouldn't make sense to use this outside of a merge where statement (since it deals with template version), so probably best to not be too generic. Anyway, just a thought while trying to understand the code. |
|
The |
A merged set or problem version was not including the version 0 template row from the set_user/problem_user table: the generic keyfield join in the Merge schema matched version_id between the primary (version) table and the lower priority tables, so the template row (version 0) never matched the version row.
This is an alternate approach to #3308. The problem with that pull request is that specialized code with dealing with the versioned merge should not be in the
WeBWorK::DB::Schema::NewSQL::Mergebase package. It should be handled in theWeBWorK::DB::Schema::NewSQL::Versionedpackage. This keeps theWeBWorK::DB::Schema::NewSQL::Mergepackage generic by delegating each keyfield join term to the primary schema's new merge_keyfield_where method. The Versioned schema overrides it so that the lower priority template tables are matched at version 0 for the version_id field.