[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (OGM-174) Composite id fail on MongoDB: MongoDBDialect only takes the first id column into account and force _id

Guillaume Scheibel (JIRA) noreply at atlassian.com
Wed May 16 09:07:09 EDT 2012


    [ https://hibernate.onjira.com/browse/OGM-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46675#comment-46675 ] 

Guillaume Scheibel edited comment on OGM-174 at 5/16/12 8:05 AM:
-----------------------------------------------------------------

In the tests, should I use @IdClass, @EmbeddedId or both ?

      was (Author: guillaume):
    In the tests, should I @IdClass, @EmbeddedId or both ?
  
> Composite id fail on MongoDB: MongoDBDialect only takes the first id column into account and force _id
> ------------------------------------------------------------------------------------------------------
>
>                 Key: OGM-174
>                 URL: https://hibernate.onjira.com/browse/OGM-174
>             Project: Hibernate OGM
>          Issue Type: Bug
>          Components: datastore
>            Reporter: Emmanuel Bernard
>            Assignee: Guillaume Scheibel
>            Priority: Blocker
>             Fix For: mongodb
>
>
> MongoDB dialect.getObject(EntityKey) does the following
> {code}DBObject searchObject = new BasicDBObject( ID_FIELDNAME, key.getColumnValues()[0] );{code}
> This cannot work in composite id environments. Same in createTuple()

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list