Skip to content

Commit 07b44a2

Browse files
committed
Revert unnecessary changes
1 parent 7fd5d5b commit 07b44a2

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

src/NHibernate/Hql/Ast/ANTLR/Tree/FromClause.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,6 @@ private FromElement FindIntendedAliasedFromElementBasedOnCrazyJPARequirements(st
375375
return null;
376376
}
377377

378-
public void RegisterFromElement(FromElement element, out bool isFirst)
379-
{
380-
isFirst = !HasRegisteredFromElements;
381-
RegisterFromElement(element);
382-
}
383-
384378
public void RegisterFromElement(FromElement element)
385379
{
386380
_fromElements.Add(element);
@@ -390,7 +384,6 @@ public void RegisterFromElement(FromElement element)
390384
// The HQL class alias refers to the class name.
391385
_fromElementByClassAlias.Add(classAlias, element);
392386
}
393-
394387
// Associate the table alias with the element.
395388
string tableAlias = element.TableAlias;
396389
if (tableAlias != null)
@@ -400,7 +393,7 @@ public void RegisterFromElement(FromElement element)
400393

401394
if (element.IsEntityJoin())
402395
{
403-
_appendFromElements.Add((EntityJoinFromElement)element);
396+
_appendFromElements.Add((EntityJoinFromElement) element);
404397
}
405398
}
406399

src/NHibernate/Hql/Ast/ANTLR/Tree/FromElement.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using NHibernate.Persister.Entity;
1111
using NHibernate.SqlCommand;
1212
using NHibernate.Type;
13+
using NHibernate.Util;
1314
using IQueryable = NHibernate.Persister.Entity.IQueryable;
1415

1516
namespace NHibernate.Hql.Ast.ANTLR.Tree

src/NHibernate/Hql/Ast/ANTLR/Tree/FromElementFactory.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ public FromElement CreateElementJoin(IQueryableCollection queryableCollection)
254254
_classAlias,
255255
targetEntityPersister,
256256
(EntityType)queryableCollection.ElementType,
257-
tableAlias);
257+
tableAlias
258+
);
258259

259260
// If the join is implied, then don't include sub-classes on the element.
260261
if (_implied)
@@ -457,10 +458,10 @@ private FromElement CreateJoin(
457458
// origin, path, implied, columns, classAlias,
458459
IEntityPersister entityPersister = _fromClause.SessionFactoryHelper.RequireClassPersister(entityClass);
459460
FromElement destination = CreateAndAddFromElement(entityClass,
460-
_classAlias,
461-
entityPersister,
462-
type,
463-
tableAlias);
461+
_classAlias,
462+
entityPersister,
463+
type,
464+
tableAlias);
464465
return InitializeJoin(_path, destination, joinSequence, Columns, _origin, manyToMany);
465466
}
466467

@@ -523,20 +524,18 @@ private IASTNode CreateFromElement(string text)
523524
return ast;
524525
}
525526

526-
private void InitializeAndAddFromElement(
527-
FromElement element,
528-
string className,
529-
string classAlias,
530-
IEntityPersister entityPersister,
531-
EntityType type,
532-
string tableAlias)
527+
private void InitializeAndAddFromElement(FromElement element,
528+
string className,
529+
string classAlias,
530+
IEntityPersister entityPersister,
531+
EntityType type,
532+
string tableAlias)
533533
{
534534
if (tableAlias == null)
535535
{
536536
AliasGenerator aliasGenerator = _fromClause.AliasGenerator;
537537
tableAlias = aliasGenerator.CreateName(entityPersister.EntityName);
538538
}
539-
540539
element.InitializeEntity(_fromClause, className, entityPersister, type, classAlias, tableAlias);
541540
}
542541

0 commit comments

Comments
 (0)