문제

SDF 데이터베이스와 함께 nhibernate를 사용하고 있습니다. 내 hibernate.cfg.xml 파일에서 다음을 설정했습니다.

<property name="hbm2ddl.auto" value="update"/>

그러나 이것은 전혀 작동하지 않는 것 같습니다. "업데이트"속성으로 인해 응용 프로그램이 시작되는 동안 nhibernate가 누락 된 테이블과 열을 생성해야하지만 발생하지 않습니다.

누락 된 테이블을 원한다면 geenrated를 원한다면 hbm2dll.auto 속성을 "작성"하도록 설정해야합니다.

PostgreSQL 문제와 동일한 문제를 경험했습니다. 내가 뭔가를 놓치고 있습니까?

도움이 되었습니까?

해결책 2

As far as I remember, I resolved the problem by using:

new SchemaUpdate(_cfg);

Please read about SchemaUpdate in NHibernate documentation.

You can alternatively try using Fluent NHibernate which will definetely work as you expect and even better!

다른 팁

Just got the same issue. I changed the way the property is defined. Instead of:

<property name="hbm2ddl.auto" value="update"/>

I used:

<property name="hbm2ddl.auto">update</property>

Then it worked :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top