-->
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: How can i get the meta attribute's value?
PostPosted: Wed Mar 31, 2004 2:29 am 
Newbie

Joined: Wed Mar 31, 2004 2:18 am
Posts: 2
I have defined a property and attribute node in a hbm.xml file like this:
<property column="name" length="20" name="Name" not-null="true" type="string">
<meta attribute="field-description">
@hibernate.property
caption ="User's Name"
</meta>
</property>

and how can i get the meta attribute's value(eg. the value of capation) in hibernate?

I hava already tried this
Configuration cfg = null;
SessionFactory sf = null;

cfg = new Configuration().configure();
sf = cfg.buildSessionFactory();

ClassMetadata metadata = sf.getClassMetadata(Customer.class);
Table t = cfg.getClassMapping(Customer.class).getTable();
Column column = t.getColumn(1);
System.out.println(column.getName());
System.out.println(column.getAlias());
System.out.println(column.isNullable());
System.out.println(column.getLength());
System.out.println(column.getType().getName());
but can not get the value of meta attribute "caption" .

Any help is appreciated!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2004 10:10 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
property.getMetaAttributes()

_________________
Emmanuel


Top
 Profile  
 
 Post subject: thanks
PostPosted: Wed Mar 31, 2004 10:49 pm 
Newbie

Joined: Wed Mar 31, 2004 2:18 am
Posts: 2
thanks very muck!


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.