I have persistable java classes "eg.Story" and "eg.Author"
Author is a property of Story, as is LanguageCode
I wish to find all Stories by that Author
right now I am trying somthing along the lines of
Code:
List stories = sess.find("from story in class eg.Story where story.author = ? and story.languageCode = ?", new Object[]{someauthor,somelangcode}, new Type[]{eg.Author, Hibernate.STRING});
but obviously that fails as the compiler wants me to provide a hibernate Type, not a class as I first guessed.
I have googled about for some examples but alas have come up dry. I keep seeing references to 'left joins' and suspect that may be what I am after, but like I say in my subject line, I am a sql dummy and have no idea what a 'left join' is.
can someone help me with this, or point me at some good docs where i can read up on HQL for SQL dummies?
also if I don't care about the language code for some queries then is is acceptable to set
Code:
String somelanguagecode = "*";
and assume that it will function as a wildcard, or do i have to test for null and change my query accordingly?
dave