Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0433]: failed to resolve: could not find sea_orm_active_enums in entities #76

Closed
frederikhors opened this issue Oct 13, 2022 · 2 comments · Fixed by #80
Closed
Assignees

Comments

@frederikhors
Copy link

Description

I'm having this issue after generation in a new project with:

seaography-cli postgres://postgres:postgres@localhost/my_db?sslmode=disable test-seaography test-seaography
Compiling test-seaography v0.1.0
error[E0433]: failed to resolve: could not find `sea_orm_active_enums` in `entities`
 --> src\entities\player.rs:9:5
  |
9 |     seaography::macros::Filter,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `sea_orm_active_enums` in `entities`
  |
  = note: this error originates in the derive macro `seaography::macros::Filter` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0433`.

What should I do?

What did I do wrong?

Versions

sea-orm v0.9.3
sea-orm-macros v0.9.3 (proc-macro)
sea-query v0.26.3
sea-query-derive v0.2.0 (proc-macro)
sea-query-driver v0.2.2 (proc-macro)
sea-strum v0.23.0
sea-strum_macros v0.23.0 (proc-macro)
sea-orm v0.9.3 (*)
sea-orm-cli v0.9.3:
    sea-orm-cli.exe
    sea.exe
seaography-cli v0.1.2:
    seaography-cli.exe

Windows 10

Postgres 14

@karatakis
Copy link
Collaborator

Can you provide me with a SQL schema that reproduces this error ?

My suspicion is that the database uses an exotic type that is not supported by the default filters and defaults to Enum
The Code that manages this behavior is located here.

@frederikhors
Copy link
Author

the database uses an exotic type

The DB is created with SeaORM migrations file.

--
-- PostgreSQL database dump
--

-- Dumped from database version 14.5 (Debian 14.5-1.pgdg110+1)
-- Dumped by pg_dump version 14.5

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA public;


ALTER SCHEMA public OWNER TO postgres;

--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'standard public schema';

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: player; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.player (
    team_id bigint NOT NULL,
    id character varying NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone,
    state character varying NOT NULL,
    role character varying NOT NULL,
    email character varying NOT NULL,
    firstname character varying NOT NULL,
    lastname character varying NOT NULL,
    img character varying
);


ALTER TABLE public.player OWNER TO postgres;

--
-- Name: seaql_migrations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.seaql_migrations (
    version character varying NOT NULL,
    applied_at bigint NOT NULL
);


ALTER TABLE public.seaql_migrations OWNER TO postgres;

--
-- Name: player player_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.player
    ADD CONSTRAINT player_email_key UNIQUE (email);


--
-- Name: player player_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.player
    ADD CONSTRAINT player_id_key UNIQUE (id);


--
-- Name: player player_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.player
    ADD CONSTRAINT player_pkey PRIMARY KEY (team_id, id);


--
-- Name: seaql_migrations seaql_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.seaql_migrations
    ADD CONSTRAINT seaql_migrations_pkey PRIMARY KEY (version);


--
-- PostgreSQL database dump complete
--

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants