I'm a newer for hibernate, and used to use JDBC for persistence layer. Now I have some questions for hibernate as below:
1. If I have a large table contains a large numbers of columns, in one or two column(s), I wanna use the keyword as "like" or operation as ">", "<". Is it have to use hql for all columns query, or is there any way for mapping other exactly match columns automatically and use hql for the special columns only.
2. If I have 2 tables ones contains the other's keys in one column split for "," like "1,2,4,5" (the number is the key in other table), how can I mapping it for one-many. And if the user need to query something like 1st table contains "1,5" information how can I wrtie the hql? Using keyword like?
Thanks a lot for helping.
|