kurtbuilds / ormlite

An ORM in Rust for developers that love SQL.
https://crates.io/crates/ormlite
MIT License
216 stars 11 forks source link

MODEL_FOLDERS is not set: NotPresent #21

Closed eruca closed 1 year ago

eruca commented 1 year ago

when I use macro in a struct User:

use ormlite::model::Model;

#[derive(Debug,serde::Serialize, Model)]
pub struct User {
    pub id i32,
    pub name String
}

the error show:

proc-macro derive panicked
message: MODEL_FOLDERS is not set: NotPresent

how to fix

kurtbuilds commented 1 year ago

The current version requires that variable to be set. You can likely set it to your project root or your src folder.

The next version will use a default, making it optional.

On Sat, Mar 4, 2023 at 21:07 eruca @.***> wrote:

when I use macro in a struct User:

use ormlite::model::Model;

[derive(Debug,serde::Serialize, Model)]pub struct User {

pub id i32,
pub name String}

the error show:

proc-macro derive panicked message: MODEL_FOLDERS is not set: NotPresent

how to fix

— Reply to this email directly, view it on GitHub https://github.com/kurtbuilds/ormlite/issues/21, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATA3QLL267YTGNJSNWIZPZ3W2PYNJANCNFSM6AAAAAAVP4BJPU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Kurt LinkedIn https://www.linkedin.com/in/kurtbuilds

eruca commented 1 year ago

thanks!