Skip to content

Commit

Permalink
fixed bug with query builder join without on condition + fixed errors…
Browse files Browse the repository at this point in the history
… of missing deps
  • Loading branch information
Umed Khudoiberdiev committed Jun 23, 2016
1 parent a7e5236 commit f5999cd
Show file tree
Hide file tree
Showing 15 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "typeorm",
"private": true,
"version": "0.0.2-alpha.42",
"version": "0.0.2-alpha.43",
"description": "Data-mapper ORM for Typescript",
"license": "Apache-2.0",
"readmeFilename": "README.md",
Expand Down
1 change: 0 additions & 1 deletion src/persistment/EntityPersistOperationsBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {JunctionRemoveOperation} from "./operation/JunctionRemoveOperation";
* if relation has "insert" it can insert a new entity
* if relation has "update" it can only update related entity
* if relation has "remove" it can only remove related entity
* @internal
*/
export class EntityPersistOperationBuilder {

Expand Down
1 change: 0 additions & 1 deletion src/persistment/PersistOperationExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {RelationMetadata} from "../metadata/RelationMetadata";

/**
* Executes PersistOperation in the given connection.
* @internal
*/
export class PersistOperationExecutor {

Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/InsertOperation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/**
* @internal
*/
export class InsertOperation {

Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/JunctionInsertOperation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {EntityMetadata} from "../../metadata/EntityMetadata";

/**
* @internal
*/
export class JunctionInsertOperation {
constructor(public metadata: EntityMetadata,
Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/JunctionRemoveOperation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {EntityMetadata} from "../../metadata/EntityMetadata";

/**
* @internal
*/
export class JunctionRemoveOperation {
constructor(public metadata: EntityMetadata,
Expand Down
2 changes: 0 additions & 2 deletions src/persistment/operation/PersistOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {UpdateByRelationOperation} from "./UpdateByRelationOperation";
import {UpdateByInverseSideOperation} from "./UpdateByInverseSideOperation";

/**
* @internal
*/
export interface EntityWithId {
id: any;
Expand All @@ -16,7 +15,6 @@ export interface EntityWithId {
}

/**
* @internal
*/
export class PersistOperation {

Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/RemoveOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {RelationMetadata} from "../../metadata/RelationMetadata";
import {EntityMetadata} from "../../metadata/EntityMetadata";

/**
* @internal
*/
export class RemoveOperation {
constructor(public target: Function|string, // todo: probably should be metadata here
Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/UpdateByInverseSideOperation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {RelationMetadata} from "../../metadata/RelationMetadata";

/**
* @internal
*/
export class UpdateByInverseSideOperation {
constructor(public entityTarget: Function|string, // todo: probably must be entity metadata here?
Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/UpdateByRelationOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {InsertOperation} from "./InsertOperation";
import {RelationMetadata} from "../../metadata/RelationMetadata";

/**
* @internal
*/
export class UpdateByRelationOperation {
constructor(public entityTarget: Function|string, // todo: probably must be entity metadata here?
Expand Down
1 change: 0 additions & 1 deletion src/persistment/operation/UpdateOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {ColumnMetadata} from "../../metadata/ColumnMetadata";
import {RelationMetadata} from "../../metadata/RelationMetadata";

/**
* @internal
*/
export class UpdateOperation {
constructor(public target: Function|string,
Expand Down
2 changes: 1 addition & 1 deletion src/query-builder/QueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ export class QueryBuilder<Entity> {

const parentAlias = join.alias.parentAliasName;
if (!parentAlias) {
return " " + joinType + " JOIN " + joinTableName + " " + join.alias.name + " " + join.conditionType + " " + join.condition;
return " " + joinType + " JOIN " + joinTableName + " " + join.alias.name + " " + (join.condition ? ( join.conditionType + " " + join.condition ) : "");
}

const foundAlias = this.aliasMap.findAliasByName(parentAlias);
Expand Down
1 change: 0 additions & 1 deletion src/query-builder/alias/Alias.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {ColumnMetadata} from "../../metadata/ColumnMetadata";

/**
* @internal
*/
export class Alias {
isMain: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ interface LoadMap {
/**
* Transforms plain old javascript object
* Entity is constructed based on its entity metadata.
*
* @internal
*/
export class PlainObjectToDatabaseEntityTransformer<Entity extends ObjectLiteral> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {ObjectLiteral} from "../../common/ObjectLiteral";
/**
* Transforms plain old javascript object
* Entity is constructed based on its entity metadata.
*
* @internal
*/
export class PlainObjectToNewEntityTransformer {

Expand Down

0 comments on commit f5999cd

Please sign in to comment.