Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0
Here goes: I am creating an object through dynamic instantiation.
Code:
String queryString = "select new MessageSummary (message.messageId,message.MessageType,repository.EntityName,
session, elements(message.fields))";
queryString+= " from MessageDBObject message, SessionDBObject session, RepositoryObjectDBObject repository where message.MessageArrivalTime between :started and :ended";
I receive a query syntax error because "no appropriate constructor was found" - referring to the last parameter in my constructor, the 'elements' query.
My question is this - what does the HQL return when it runs
elements?
I am trying to get a collection of message fields (mapped as contained as a list inside MessageDBObj). I cannot see what this elements query returns and thus am really going on a limb trying to get it out.
Another question - I am trying to get a list of message fields using
the 'elements' keyword - how can I limit the fields in the list to only ones with particular field name? Is this possible?
Thanks in advance to everyone out there wiliing to give a hand to a newbie from the near east.
Eyal