feat: implement preliminary composite primary key support

Add support for entities with composite primary keys using multiple
#[georm(id)] fields. Automatically generates {EntityName}Id structs for
type-safe composite key handling.

Features:
- Multi-field primary key detection and ID struct generation
- Full CRUD operations (find, create, update, delete, create_or_update)
- Proper SQL generation with AND clauses for composite keys
- Updated documNtation in README and lib.rs

Note: Relationships not yet supported for composite key entities
This commit is contained in:
2025-06-07 16:16:46 +02:00
parent 190c4d7b1d
commit 19284665e6
17 changed files with 712 additions and 75 deletions
+6
View File
@@ -39,8 +39,14 @@ sqlx = { workspace = true }
georm-macros = { workspace = true }
[dev-dependencies]
chrono = { version = "0.4", features = ["serde"] }
rand = "0.9"
[dev-dependencies.sqlx]
version = "0.8.6"
default-features = false
features = ["postgres", "runtime-tokio", "macros", "migrate", "chrono"]
[workspace.lints.rust]
unsafe_code = "forbid"