mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
minor fixes;
This commit is contained in:
parent
8f5827b550
commit
2faec895ba
@ -143,11 +143,13 @@ export class RelationIdLoader {
|
||||
const qb = new QueryBuilder(this.connection, this.queryRunnerProvider);
|
||||
|
||||
inverseJoinColumns.forEach(joinColumn => {
|
||||
qb.addSelect(junctionAlias + "." + joinColumn.propertyPath, joinColumn.databaseName);
|
||||
qb.addSelect(junctionAlias + "." + joinColumn.propertyPath, joinColumn.databaseName)
|
||||
.addOrderBy(junctionAlias + "." + joinColumn.propertyPath);
|
||||
});
|
||||
|
||||
joinColumns.forEach(joinColumn => {
|
||||
qb.addSelect(junctionAlias + "." + joinColumn.propertyPath, joinColumn.databaseName);
|
||||
qb.addSelect(junctionAlias + "." + joinColumn.propertyPath, joinColumn.databaseName)
|
||||
.addOrderBy(junctionAlias + "." + joinColumn.propertyPath);
|
||||
});
|
||||
|
||||
qb.fromTable(inverseSideTableName, inverseSideTableAlias)
|
||||
|
||||
@ -678,6 +678,7 @@ describe("query builder > relation-id > many-to-many > multiple-pk", () => {
|
||||
.loadRelationIdAndMap("image.categoryIds", "image.categories")
|
||||
.leftJoinAndSelect("image.categories", "category")
|
||||
.loadRelationIdAndMap("category.postIds", "category.posts")
|
||||
.orderBy("category.id")
|
||||
.getMany();
|
||||
|
||||
expect(loadedImages[0].categoryIds).to.not.be.empty;
|
||||
@ -707,6 +708,7 @@ describe("query builder > relation-id > many-to-many > multiple-pk", () => {
|
||||
.loadRelationIdAndMap("image.categoryIds", "image.categories")
|
||||
.leftJoinAndSelect("image.categories", "category")
|
||||
.loadRelationIdAndMap("category.postIds", "category.posts")
|
||||
.orderBy("category.id")
|
||||
.where("image.id = :id", { id: 1 })
|
||||
.getOne();
|
||||
|
||||
|
||||
@ -187,6 +187,7 @@ describe("query builder > relation-id > one-to-many > basic-functionality", () =
|
||||
.loadRelationIdAndMap("post.categoryIds", "post.categories")
|
||||
.leftJoinAndSelect("post.categories", "category")
|
||||
.loadRelationIdAndMap("category.imageIds", "category.images")
|
||||
.orderBy("category.id")
|
||||
.getMany();
|
||||
|
||||
expect(loadedPosts[0].categoryIds).to.not.be.empty;
|
||||
@ -220,6 +221,7 @@ describe("query builder > relation-id > one-to-many > basic-functionality", () =
|
||||
.leftJoinAndSelect("post.categories", "category")
|
||||
.loadRelationIdAndMap("category.imageIds", "category.images")
|
||||
.where("post.id = :id", { id: 1 })
|
||||
.orderBy("category.id")
|
||||
.getOne();
|
||||
|
||||
expect(loadedPost!.categoryIds).to.not.be.empty;
|
||||
|
||||
@ -292,6 +292,7 @@ describe("query builder > relation-id > one-to-many > multiple-pk", () => {
|
||||
.loadRelationIdAndMap("post.categoryIds", "post.categories")
|
||||
.leftJoinAndSelect("post.categories", "category")
|
||||
.loadRelationIdAndMap("category.imageIds", "category.images")
|
||||
.orderBy("category.id")
|
||||
.getMany();
|
||||
|
||||
expect(loadedPosts[0].categoryIds).to.not.be.empty;
|
||||
@ -323,6 +324,7 @@ describe("query builder > relation-id > one-to-many > multiple-pk", () => {
|
||||
.loadRelationIdAndMap("category.imageIds", "category.images")
|
||||
.where("post.id = :id", { id: 1 })
|
||||
.andWhere("post.authorId = :authorId", { authorId: 1 })
|
||||
.orderBy("category.id")
|
||||
.getOne();
|
||||
|
||||
expect(loadedPost!.categoryIds).to.not.be.empty;
|
||||
|
||||
@ -4,7 +4,7 @@ import {Record} from "./entity/Record";
|
||||
import {Connection} from "../../../src/connection/Connection";
|
||||
import {closeTestingConnections, createTestingConnections} from "../../utils/test-utils";
|
||||
|
||||
describe.skip("uuid type", () => {
|
||||
describe("uuid type", () => {
|
||||
|
||||
let connections: Connection[];
|
||||
before(async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user