Spécifier les colonnes retournées par select
Code:
1 2 3 4 5 6 7 8 9
| public List findByProperty22(String table, String propertyName, String S1) {
try {
String queryString = "from " + table + " as model where model."
+ propertyName + " = '" + S1 + "'";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
throw re;
} |
Bonjour;
Voici ma méthode dans le DAO.Java, qui me retourne une liste
la méthode execute un Select * from ...... automatiquement, je voudrai préciser les attributs qui rentre dans le SELECT
select X from.....