Always think of HQL in terms of the Objects, not the table/columns. You want to do:
Code:
from ComponentPowerLimit cpl where cpl.component = :component and terminated is null
Then you would bind the Component object to the HQL query, something like this:
Code:
Component comp = session.get(Component.class,new Long(779511201));
List cpls = session.createQuery(hql).setEntity("component",comp).list();
Of course, this is just sample code. I assume that you would already have the Component loaded previously, and wouldn't really load it by id just for this query. If that were the case, then you
could do it in one shot with a query like:
Code:
from ComponentPowerLimit cpl where cpl.component.componentId = :componentid and terminated is null
where componentId is the name of the field in your Component object for the primary key (you didn't show one in your posted code, so I don't know what yours is really named).
Hope this helps.