A copy or move operation duplicates or relocates a resource while preserving its associated data and respecting constraints inherited from the destination. Treating the operation as a single-record update can produce incomplete or surprising resources. section 17.3.2 section 17.3.5
Moving a ChatRoom with messages
Moving ChatRoom old to ChatRoom new must also update each Message path from chatRooms/old/messages/... to chatRooms/new/messages/.... If the destination ChatRoom imposes a messageLengthLimit that any message violates, reject the entire operation with clear failure reasons rather than silently truncating data. section 17.3.2 section 17.3.5
Use these rules when designing the operation:
- Include every child resource so the destination behaves as much like the source as possible. section 17.3.2
- Validate children against metadata inherited from the destination parent. section 17.3.5
- Reject and abort on violations; let users correct the data or destination constraints before retrying. section 17.3.5
Table 17.1 New and old identifiers after moving (or copying) a ChatRoom resource (view table figure)
Compare original and new identifiers for the parent and each moved or copied child resource. section 17.3.2
