From: Raible, M. <Mat...@ca...> - 2002-12-31 16:36:44
|
I have to rows in my "user" table and I expect to get two rows of data back. However, the following query returns two items in the list, but they're the same: List users = (List) ses.find("from cct_user in class com.cable.comcast.dmc.itd.cct.persistence.User where cct_user.userId=?", userId, Hibernate.STRING); Is this because userId is the named in User.hbm.xml as the primary key? I tried to create a composite-id element, which is what it is in the database, but XDoclet doesn't seem to let me. I added two @hibernate.id tags to two different getters, but that just generated two different id elements in my xml mapping file. Thanks, Matt |