|
|
|
помогите с Hibernate
|
|||
|---|---|---|---|
|
#18+
простой класс public class Users { private Long id; public void setId(Long id){this.id = id;} public Long getId(){return id;} } файл users.hbm.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="test.Users" table="Users"> <id name="id" type="long" column="userID"> <generator class="identity"/> </id> </class> </hibernate-mapping> в куске когда String query = "select userID from Users"; List list = mySession.createQuery(query).list(); if (list.size()==0 ) { } Ошибка -No data type for node: org.hibernate.hql.ast.tree.IdentNode \-[IDENT] IdentNode: 'userID' {originalText=userID} что делать? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.10.2007, 21:51:57 |
|
||
|
|

start [/forum/topic.php?fid=59&fpage=600&tid=2144214]: |
0ms |
get settings: |
14ms |
get forum list: |
19ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
40ms |
get topic data: |
14ms |
get forum data: |
4ms |
get page messages: |
52ms |
get tp. blocked users: |
2ms |
| others: | 332ms |
| total: | 487ms |

| 0 / 0 |
