mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2025-01-06 01:20:28 +05:30
Merge pull request #560 from TeamPiped/renovate/hibernate-core
Update hibernate core to v6.2.1.Final
This commit is contained in:
commit
73fa1edf25
@ -31,8 +31,8 @@ dependencies {
|
|||||||
implementation 'io.activej:activej-launchers-http:5.4.3'
|
implementation 'io.activej:activej-launchers-http:5.4.3'
|
||||||
implementation 'org.hsqldb:hsqldb:2.7.1'
|
implementation 'org.hsqldb:hsqldb:2.7.1'
|
||||||
implementation 'org.postgresql:postgresql:42.6.0'
|
implementation 'org.postgresql:postgresql:42.6.0'
|
||||||
implementation 'org.hibernate:hibernate-core:6.1.7.Final'
|
implementation 'org.hibernate:hibernate-core:6.2.1.Final'
|
||||||
implementation 'org.hibernate:hibernate-hikaricp:6.1.7.Final'
|
implementation 'org.hibernate:hibernate-hikaricp:6.2.1.Final'
|
||||||
implementation 'com.zaxxer:HikariCP:5.0.1'
|
implementation 'com.zaxxer:HikariCP:5.0.1'
|
||||||
implementation 'org.springframework.security:spring-security-crypto:6.0.3'
|
implementation 'org.springframework.security:spring-security-crypto:6.0.3'
|
||||||
implementation 'commons-logging:commons-logging:1.2'
|
implementation 'commons-logging:commons-logging:1.2'
|
||||||
|
@ -109,14 +109,14 @@ public class FeedHandlers {
|
|||||||
CriteriaQuery<Video> criteria = cb.createQuery(Video.class);
|
CriteriaQuery<Video> criteria = cb.createQuery(Video.class);
|
||||||
var root = criteria.from(Video.class);
|
var root = criteria.from(Video.class);
|
||||||
root.fetch("channel", JoinType.RIGHT);
|
root.fetch("channel", JoinType.RIGHT);
|
||||||
var subquery = criteria.subquery(User.class);
|
var subquery = criteria.subquery(String.class);
|
||||||
var subroot = subquery.from(User.class);
|
var subroot = subquery.from(User.class);
|
||||||
subquery.select(subroot.get("subscribed_ids"))
|
subquery.select(subroot.get("subscribed_ids"))
|
||||||
.where(cb.equal(subroot.get("id"), user.getId()));
|
.where(cb.equal(subroot.get("id"), user.getId()));
|
||||||
|
|
||||||
criteria.select(root)
|
criteria.select(root)
|
||||||
.where(
|
.where(
|
||||||
root.get("channel").in(subquery)
|
root.get("channel").get("uploader_id").in(subquery)
|
||||||
)
|
)
|
||||||
.orderBy(cb.desc(root.get("uploaded")));
|
.orderBy(cb.desc(root.get("uploaded")));
|
||||||
|
|
||||||
@ -162,14 +162,14 @@ public class FeedHandlers {
|
|||||||
CriteriaQuery<Video> criteria = cb.createQuery(Video.class);
|
CriteriaQuery<Video> criteria = cb.createQuery(Video.class);
|
||||||
var root = criteria.from(Video.class);
|
var root = criteria.from(Video.class);
|
||||||
root.fetch("channel", JoinType.RIGHT);
|
root.fetch("channel", JoinType.RIGHT);
|
||||||
var subquery = criteria.subquery(User.class);
|
var subquery = criteria.subquery(String.class);
|
||||||
var subroot = subquery.from(User.class);
|
var subroot = subquery.from(User.class);
|
||||||
subquery.select(subroot.get("subscribed_ids"))
|
subquery.select(subroot.get("subscribed_ids"))
|
||||||
.where(cb.equal(subroot.get("id"), user.getId()));
|
.where(cb.equal(subroot.get("id"), user.getId()));
|
||||||
|
|
||||||
criteria.select(root)
|
criteria.select(root)
|
||||||
.where(
|
.where(
|
||||||
root.get("channel").in(subquery)
|
root.get("channel").get("uploader_id").in(subquery)
|
||||||
)
|
)
|
||||||
.orderBy(cb.desc(root.get("uploaded")));
|
.orderBy(cb.desc(root.get("uploaded")));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user