bevy/crates/bevy_ecs/src
Carter Anderson f3f6cad43c
Panic on overlapping one-to-one relationships (#18833)
# Objective

One to one relationships (added in
https://github.com/bevyengine/bevy/pull/18087) can currently easily be
invalidated by having two entities relate to the same target.

Alternative to #18817 (removing one-to-one relationships)

## Solution

Panic if a RelationshipTarget is already targeted. Thanks @urben1680 for
the idea!

---------

Co-authored-by: François Mockers <mockersf@gmail.com>
2025-04-15 01:25:37 +00:00
..
entity Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
error Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
event Improve error message for missing events (#18683) 2025-04-02 19:25:48 +00:00
identifier bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
observer Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
query Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
reflect Replace VisitEntities with MapEntities (#18432) 2025-03-21 00:18:10 +00:00
relationship Panic on overlapping one-to-one relationships (#18833) 2025-04-15 01:25:37 +00:00
schedule Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
storage Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
system Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
world Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
archetype.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
batching.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bundle.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
change_detection.rs Expose the added tick for change detection, both getting and setting. (#18746) 2025-04-08 21:13:27 +00:00
component.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
entity_disabling.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
hierarchy.rs Add remove_children and remove_related to EntityWorldMut and EntityCommands (#18835) 2025-04-14 20:27:08 +00:00
intern.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
label.rs do_not_recommend interned Labels (#17950) 2025-02-25 23:46:21 +00:00
lib.rs Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
name.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
never.rs Use never_say_never hack to work around Rust 2024 regression for fn traits (#18804) 2025-04-14 19:59:48 +00:00
removal_detection.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
resource.rs Move Resource trait to its own file (#17469) 2025-01-21 19:47:08 +00:00
spawn.rs Change with_related to work with a Bundle and added with_relationships method (#18699) 2025-04-09 02:34:49 +00:00
traversal.rs Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00