-
Notifications
You must be signed in to change notification settings - Fork 21
Fix db compatibility issues with Opencast 13 #607
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
Fix db compatibility issues with Opencast 13 #607
Conversation
Opencast 13 reworked some of their common db classes (in PR opencast#3903), which we also use in the Annotation Tool, thus breaking it. This commit attempts to fix the breaking changes by using the new classes introduced in Opencast 13. From a user perspective, this should change exactly nothing. There is also no DB migration, as the db entries themselves have not changed. This commit is based on groundwork by @KatrinIhler, massive thanks to her.
JulianKniephoff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is fine, but I do have a few questions and nitpicks.
Oh and as a general note, I don't think lol and lel are appropriate variable names. ;D
...tion-impl/src/main/java/org/opencast/annotation/endpoint/ExtendedAnnotationsRestService.java
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
Fix various small oversights from temporary development code
There were two functionally very similar `findById` functions. Now there is only one.
Minimum version is now Opencast 13.
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
Apparently if you set parameters on a namedQuery directly, there are some shenanigans that can happen when it comes to dates. Opencast has a function called `configureQuery` https://github.com/opencast/opencast/blob/develop/modules/common/src/main/java/org/opencastproject/db/Queries.java#L58 to handle this, but does not grant anyone access to it. In my plight I just copied it over.
…g our own. Co-authored-by: Julian Kniephoff <me@juliankniephoff.com>
Make every caller pass their preferred type instead of doing a cast.
30561e8 to
4816134
Compare
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/opencast/annotation/impl/persistence/ExtendedAnnotationServiceJpaImpl.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Julian Kniephoff <me@juliankniephoff.com>
Co-authored-by: Julian Kniephoff <me@juliankniephoff.com>
JulianKniephoff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Opencast 13 reworked some of their common db classes (in PR opencast#3903), which we also use in the Annotation Tool, thus breaking it.
This commit attempts to fix the breaking changes by using the new classes introduced in Opencast 13. From a user perspective, this should change exactly nothing. There is also no DB migration, as the db entries themselves have not changed.
This commit is based on groundwork by @KatrinIhler, massive thanks to her.
Should fix #595, and supersede #606