tiesselune / reindeer-rs

A thin entity layer around Sled using Bincode for serialization
MIT License
12 stars 2 forks source link

error[E0618]: expected function, found `(&'static str, reindeer::DeletionBehaviour)` #13

Open STPR opened 8 months ago

STPR commented 8 months ago

Hello, I've an issue with the Entity macro and relations. I'm trying to make a one-to-many relationship so i'm using the following syntax: #[siblings(("user_data",Cascade),("user_data2",Cascade))]

But the Entity macro gives me an error as soon as there's more than one relation:

error[E0618]: expected function, found `(&'static str, reindeer::DeletionBehaviour)`
   |
   | #[derive(Serialize, Deserialize, Entity)]
   |                                  ^^^^^^ call expression requires function
   |
   = note: this error originates in the derive macro `Entity` (in Nightly builds, run with -Z macro-backtrace for more info)

This happens with siblings and children.

STPR commented 8 months ago

I've tested the 'migration-system' branch and it's working correctly 👍🏼

tiesselune commented 6 months ago

Yes it might be that I updated the readme on the wrong branch 😅