-->
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: Is OGM ignore someway named query written in ORM's .hbm.xml
PostPosted: Mon Jan 04, 2016 5:13 am 
Newbie

Joined: Mon Jan 04, 2016 4:43 am
Posts: 1
My application contains both ORM and OGM. For ORM I was wrote some named queries in xyz.hbm.xml. But while using OGM those queries caused for exception. I am using OGM 4.1.3.Final version. Please help someone.


Top
 Profile  
 
 Post subject: Re: Is OGM ignore someway named query written in ORM's .hbm.xml
PostPosted: Mon Jan 04, 2016 6:17 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
OGM is for NoSQL databases, so I wonder how do you want to run some named queries from the Hibernate ORM legacy configuration?

1. Are you planning to use both a relational database and a NoSQL store?
2. Why don't you use the JPA persistence.xml for configuring OGM?


Top
 Profile  
 
 Post subject: Re: Is OGM ignore someway named query written in ORM's .hbm.xml
PostPosted: Mon Jan 04, 2016 9:23 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi,

Can you share the exact exception you get and the queries you are trying to run? What Hibernate OGM backend are you using? Is this about named *JP-QL/HQL* or *SQL* queries? The former should work with Hibernate OGM to some degree (e.g. simple SELECTs), whereas the latter naturally don't work as our current backends don't support SQL as a query language.

Querying is work-in-progress in general, so it'd be valuable to know what you are after. You might also send in a pull request to enhance our experimental parser (which translates JP-QL into native NoSQL queries such as MongoDB's CLI query syntax or Neo4j's Cypher language) so it supports the things you are after. An alternative is to use Hibernate Search which will create a separate Lucene index, allowing to run queries against it and fetch result entities from the underlying NoSQL store.

Cheers,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: Is OGM ignore someway named query written in ORM's .hbm.xml
PostPosted: Mon Jan 04, 2016 9:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Hi Gunnar,

There's a discussion on StackOverflow also related to this issue:

http://stackoverflow.com/questions/34587568/ogm-and-orm-named-queries-in-xml-file/34589560?noredirect=1#comment56927214_34589560


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.