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: reading meta tags
PostPosted: Mon Aug 06, 2007 11:04 am 
Regular
Regular

Joined: Mon Aug 06, 2007 10:49 am
Posts: 67
Location: Banska Bystrica, Slovakia
Hi,

I would like to ask if there is a way in aplication how to read information in meta tags from hibernate mapping file *.hbm.xml.?

Code:
<hibernate-mapping>

    <class
        name="xxx.yyy.zzz.SomeDTO"
        table="some_table"
        lazy="false"
       
    >
   <meta attribute="description">some description of dto</meta>

...



cause hibernate keeps mapping information in memory, so is possible somehow to get to such meta attribute?

thnx


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 12:37 pm 
Expert
Expert

Joined: Fri Jul 13, 2007 8:18 am
Posts: 370
Location: london
If you can get the Configuration object used to build the session factory then yes:
Code:
PersistentClass classMapping = config.getClassMapping("test.User");
System.out.println(classMapping.getMetaAttribute("description").getValue());


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 09, 2007 2:14 am 
Regular
Regular

Joined: Mon Aug 06, 2007 10:49 am
Posts: 67
Location: Banska Bystrica, Slovakia
thnx helped


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.