huntlabs / hunt-entity

An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.

Home Page:https://www.huntlabs.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ManyToMany does not appear to work

ximion opened this issue · comments

Hi!
Given this artificial example of one blog page with multiple authors:

@Table("users")
class User
{
    mixin MakeEntity;

    @PrimaryKey
    @AutoIncrement
    int id;

    string name;
    string email;

    @ManyToMany(FetchType.LAZY)
    Blog[] blogs;
}

@Table("blog")
class Blog
{
    mixin MakeEntity;

    @AutoIncrement @PrimaryKey
    int id;

    string title;
    string content;

    @ManyToMany(FetchType.LAZY)
    User[] users;
}

I would expect an additional table, like users_blog_map to be created and maintained to keep the ManyToMany relation in the database.
Instead, the relation simply gets ignored completely, with no changes being written to the database - so I am either using the feature wrong, or something is missing.

this feature isn't implemented.

Hmm, that's a shame, I have software based on HibernateD here that relies heavily on it and that can't be ported to hunt-entity without many-to-many relations.
Can you give any information on the priority of implementing this / some time estimate on when the feature might be done?
Is there something I can do to help having it added?

@ximion ManyToMany is worked.