class Card
{
        import hibernated.core;
        
        @Id
        @Generated
        long id;
        @UniqueKey
        string pwd;
}

        MySQLDriver driver = new MySQLDriver();
string url = MySQLDriver.generateUrl("10.211.55.10", 3306, "test"); string[string] params = MySQLDriver.setUserAndPassword("root", "xxx");
        auto ds = new ConnectionPoolDataSourceImpl(driver, url, params);
        
        EntityMetaData schema = new SchemaInfoImpl!(Card);
        Dialect dialect = new MySQLDialect();
        auto factory = new SessionFactoryImpl(schema, dialect, ds);

        
        Card c = new Card;
        auto s = factory.openSession();
        scope(exit) s.close();
        s.save(c);


Here is the simplest example, but it complains the same error.

Reply via email to