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

Throw exception in a save operation if the POJO's ID field is null and field type is not String, BigInteger or ObjectId.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 M5
    • Fix Version/s: 1.0 RC1
    • Component/s: Mapping
    • Labels:
      None

      Description

      findById with int type id returns null.

        Issue Links

          Activity

          Hide
          Mark Pollack added a comment -

          Posted reply in forum. To avoid misunderstanding around what conventions are supported with data types and automatically generated IDs, an exception will be thrown during a save operation if the POJO's ID field is null and is not a String, BigInteger or ObjectId type.

          Show
          Mark Pollack added a comment - Posted reply in forum. To avoid misunderstanding around what conventions are supported with data types and automatically generated IDs, an exception will be thrown during a save operation if the POJO's ID field is null and is not a String, BigInteger or ObjectId type.
          Hide
          drypot added a comment -

          Posted reply in forum.

          Show
          drypot added a comment - Posted reply in forum.

            People

            • Assignee:
              Oliver Gierke
              Reporter:
              drypot
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1.05h
                1.05h