insertWaypointWithTrackCheck

open suspend fun insertWaypointWithTrackCheck(waypoint: WaypointEntity)

Inserts a waypoint, ensuring the parent track exists.

If the waypoint's track doesn't exist yet (It should but just in case):

  • Creates a new "Untitled Track"

  • Uses the new track's ID as the waypoint's trackOwnerId

This method is marked @Transaction to ensure both inserts happen atomically.

Parameters

waypoint