I have an entity that is part of a table-per-subclass mapping. I have
the following tables:

PARENT
-- ID

CHILD
-- ID
-- ...

When I issue a batch statement using ExecuteUpdate, it issues the
following statements:

create table #PARENT(
  ID decimal   not null)

insert into #PARENT
SELECT parent0_.ID as ID
FROM   PARENT parent0_
       inner join CHILD child0_1_
         on parent_.ID = child0_1_.ID
WHERE  ID = 100001

Executing this gives the following error:

Msg 209, Level 16, State 1, Line 6
Ambiguous column name 'ID'.

I guess the problem comes from the fact that no table alias is used
(parent0_) preceding the ID column in the where clause (WHERE
parent0_.ID = 100001). The HQL statement I'm using looks like this:

"update Entity set Type = :type where Id = :id"

Is there something that I'm doing wrong here or is this a bug?
-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to