- This topic has 3 replies, 2 voices, and was last updated 19 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
Thomas TrostelParticipantWhats wrong with this picture?
<hibernate-mapping package="xxx.dao"> <class name="Batches" table="batches"> <cache usage="nonstrict-read-write"/> <id name="batchId" column="BATCH_ID" type="java.lang.String"> <generator class="assigned"/> </id> <property name="processId" column="PROCESS_ID" type="java.lang.String" not-null="true" /> <property name="payDocDate" column="PAY_DOC_DATE" type="java.util.Date" /> <property name="totalRecSum" column="TOTAL_REC_SUM" type="java.lang.Long" /> <property name="totalRecTxns" column="TOTAL_REC_TXNS" type="java.lang.Long" /> <property name="totalRecError" column="TOTAL_REC_ERROR" type="java.lang.Long" /> <property name="createId" column="CREATE_ID" type="java.lang.String" /> <property name="createDate" column="CREATE_DATE" type="java.util.Date" /> <set name="myInvoices"> <key column="BATCH_ID" not-null="true"/> <one-to-many class="Invoices"/> </set> </class> </hibernate-mapping>
I believe this used to work with Hibernate 2 but Hibernate 3 doesn’t like the set declaration portion. Maybe its something really small or a quirk with the newer version.
Thanks in advance 🙂
Riyad KallaMemberMoving to OT > Soft Dev (We don’t support Hib 3 yet :D)
Please correct me if this is a) generated by ME and b) broken with Hibernate 2, then I will move it back.
Thomas TrostelParticipantPerfectly understandable that Hibernate 3 isn’t supported by 3.8.1. I did figure since you all were writing version 4 now that you had probably run across this particular nasty. We do have a pretty diverse group of users on this forum who might be able to answer the question too so I just threw it out there for anyone to answer.
Oh … BTW … if you’re using the new Hibernate 3 remember that you can’t use a java.util.Date as a key element any more. You can use a java.util.Calendar and get around the problem that way but the error message provided is a bit cryptic and not very helpful.
Riyad KallaMemberThx Tom, I kicked this off to our hib dev to bookmark.
-
AuthorPosts