Skip to content

Commit 13a0661

Browse files
committed
Added [ThreadStatic] to table counter so that table aliases can be generated consistently in a multi thread environment.
1 parent 5c739ad commit 13a0661

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/NHibernate/Mapping/Table.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ public enum SchemaAction
2525
[Serializable]
2626
public class Table : IRelationalModel
2727
{
28+
[ThreadStatic]
2829
private static int tableCounter;
30+
2931
private readonly List<string> checkConstraints = new List<string>();
3032
private readonly LinkedHashMap<string, Column> columns = new LinkedHashMap<string, Column>();
3133
private readonly Dictionary<ForeignKeyKey, ForeignKey> foreignKeys = new Dictionary<ForeignKeyKey, ForeignKey>();

0 commit comments

Comments
 (0)