HQL small problem in Hibernate: Query's setParameter () parameter cannot be int, should be Integer!

xiaoxiao2021-03-05  24

The code is as follows: [ZoneId is int] query = session.createQuery ("from school school where school.zoneid =: zoneid"); Q.SetParameter ("zoneid", new integer (zoneID)); list school = q.list ();

Start me Q.SetParameter ("zoneid", zoneid); death is not compiled, halo.

However, actually API tips are also a string, an int, relying on.

转载请注明原文地址:https://www.9cbs.com/read-37853.html

New Post(0)