I am getting an inner exception of {"Line 1: Incorrect syntax near 'content0_'." }on the following HQL query:
Code:
"select content.Title, content.PageMetadata.ExpiryDate from Content as content where content.PageMetadata.UserId = " + userId + " content.ContentTypeId = 1 " ;
However, this one works fine:
Code:
"select content.Title, content.PageMetadata.ExpiryDate from Content as content where content.PageMetadata.UserId = " + userId;
So, it fails when the ContentTypeId property shows up.
The two classes are mapped on a one-to-one basis with the PageMetadata object using the Content object's primary key as its own. The database is mapped so that page_metadata has its primary key set as a foreign key to content_id, which is the primary key of the "content" database table.
Without dragging people into the guts of these classes too much, has anyone seen this sort of "content0_" syntax error before? It seems like a strange format, I figured maybe somebody would have a quick fix for this.