-->
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: JPA column position
PostPosted: Wed Mar 18, 2015 11:42 am 
Newbie

Joined: Wed Mar 18, 2015 11:38 am
Posts: 10
Hi everyone!

I am new with OGM and i am developing a mobile app using JPA and hibernate OMG. I am mapping an entity but when inserted at my mongoDB, the columns are not orded as mapped so..anyone can tell me what do set the column position when mapping the entity?

Thanks in advanced! Regards!

Javier


Top
 Profile  
 
 Post subject: Re: JPA column position
PostPosted: Thu Mar 19, 2015 1:57 pm 
Hibernate Team
Hibernate Team

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

There is no way to enforce the order of fields in MongoDB documents atm. Actually MongoDB itself may re-order document fields as per its docs: http://docs.mongodb.org/manual/core/document/

What is your use case for requiring a specific field order?

--Gunnar

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


Top
 Profile  
 
 Post subject: Re: JPA column position
PostPosted: Fri Mar 20, 2015 4:53 am 
Newbie

Joined: Wed Mar 18, 2015 11:38 am
Posts: 10
It is just an order issue, because if i insert a record in a document in a specific order through the console, i want to have the same order if i insert it though a mapped class. It is not nice to see right now in two different orders.

Just that if there was an option, it would be great.

Thanks


Top
 Profile  
 
 Post subject: Re: JPA column position
PostPosted: Mon Mar 23, 2015 8:22 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
AFAIR it's at least the MongoDB driver that does not keep the ordering. So we won't be able to do much on our side.

_________________
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.