-->
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.  [ 4 posts ] 
Author Message
 Post subject: Can I use Search without annotations?
PostPosted: Fri Jun 29, 2007 4:35 pm 
Newbie

Joined: Fri Jun 29, 2007 12:54 pm
Posts: 5
Can I use Hibernate Search without annotations (Using hbm.xml files instead) ?



If yes:

can someone give me an example hbm.xml file with a class @Indexed and some fields @Field ?




If no:

Can I generate annotations from my hbm.xml files with hbm2java?

I cant use <meta attribute="scope-class"> or any of the others. No "class-annotations" or "property-annotations" exist!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 7:05 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The answer is no to both.
But the mechanism to read metadata from XML is ready, it only lacks a motivated person to define the XML schema and write an XML parser for it.

FRT Hibernate Annotations use this solution and it's one (big) class.

Note that some people use hbm.xml files and Hibernate Search annotations together without any issue

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 11:09 pm 
Beginner
Beginner

Joined: Sun Feb 08, 2004 4:09 pm
Posts: 46
It would be great to see a xml version of Search... imagine a class mapped through hib annotations + validator annotations + search annotations, you would be like "man, what tha hell happened to this class?!?! isn't this supposed to be a pojo?". IMO the only suitable annotations are the validators cause they at least have some relationship to business logic, the rest should stay in xml.

Regards,
Thiago Souza


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 07, 2007 2:08 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The mechanism is in place but nobody spend time to design the XML schema and write a parser for it: if you are interested.

I'm more like: "Man another XML to learn, isn't it supposed to be easy?"

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.