Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
Name and version of the database you are using: Oracle9
i have an image-table and want to search for an Image with a certain keyword. Keywords are Strings collectet in a Set. how can i do this using .createCriteria?
Code:
@CollectionOfElements
public Set<String> getKeywords() {
return keywords;
}
just searching like:
Code:
criteria = session
.createCriteria(Image.class,"i")
.add(Restrictions.eq("i.keywords","uiae")
results in
xception in thread "AWT-EventQueue-0"
org.hibernate.exception.GenericJDBCException: could not execute query
at
...
Caused by: java.sql.SQLException: Fehlender IN- oder OUT-Parameter auf Index:: 2
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:190)[/code]