Spring Data MongoDB
  1. Spring Data MongoDB
  2. DATAMONGO-40

Add support for specifying attributes to entities, e.g., collection name, field names, etc.

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0 M2
    • Component/s: Core
    • Labels:
      None

      Description

      Need to be able to specify the collection name for each repository. The collection name used for each entity should be specifiable as an annotation, e.g., the Table annotation.

      Another important enabler for using spring-data-mongo in production code is to add a few annotations which have similar functionality to the @Reference, @Embedded etc. in Morphia, and for naming the fieldnames in the persistence store differently from the fieldnames used in the Java Entity. Of course these annotations should be consistent with JPA annotations, and should be a superset of JPA annotations.

      See the thread http://forum.springsource.org/showthread.php?t=102127 in the Forum.

        Activity

        Hide
        Oruganti Shanker added a comment -

        See also the forum thread http://forum.springsource.org/showthread.php?p=346693#post346693 where the hard-coding of the id field is discussed.

        Show
        Oruganti Shanker added a comment - See also the forum thread http://forum.springsource.org/showthread.php?p=346693#post346693 where the hard-coding of the id field is discussed.

          People

          • Assignee:
            Oliver Gierke
            Reporter:
            Oruganti Shanker
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0d
              0d
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 2.5h
              2.5h