-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Use of meta tag at property level in hbm2java
PostPosted: Thu Apr 15, 2004 9:28 am 
I am running Hibernate 2.1.1. We have been using this for about 1 year. We recently (3-6 months ago) updated to 2.1. I know there is an update (2.1.2), but the change logs don't point to any differences as it related to my situation.

I would like to have hibernate check that the legnth of strings are no longer than the DB field before I commit to the DB. I thought that using the META tag at the file level would generate the necessary code. When running hbm2java, it does not generate any different code than normal, and exist without error. I have used "bound" and "constrained" here. I am looking for a propertyChangeListener to be generated. Here is an example:

<property ...>
<meta incident="bound">true</meta>
</property>

I have read that someone mentioned that meta in the DTDs is incorrect. Don't know if this the problem or I have an incorrect HBM syntax (the manual is not specific here).

Any help or suggestions would be appreciated.

Kurt


Top
  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 10:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Ignore the DTD issue - it was that hbm2java accepted meta tags in more locations than the DTD allowed.

Bound tells hbm2java to add propertyChangeListener support for a property.
This is a code generation attribute not runtime.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 10:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I should have read more further - Doh. I tend to use the Validatable interface.
http://www.hibernate.org/hib_docs/reference/html/persistent-classes.html#persistent-classes-s4


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.