Reputation: 1
I use this formula in NHibernate 3.1 :
.Formula("(SELECT b.Name FROM AdaptiveObjectModel.EntityType AS b WHERE (Structure = b.EntityTypeId))")
but after switching to NHibernate 3.2 receive this problem:
ambiguous column name Structure
Upvotes: 0
Views: 235
Reputation: 27944
The error comes from SQLserver, there are at least 2 tables with the column Structure. SQLserver does not know which one to chose. I guess that something changed in the way NHibernate interprets your query, and now sends all sql at once. Have a look in the logging or your profiler to see what the sql is your are sending to SQLserver. Then you can add the right alias before Structure.
Upvotes: 1