문제

is there a way to make the DB create the ID property in an automatic way?

I want to generate something that looks like this:

Entity entity = schema.addEntity("MyEntity");
entity.addIdProperty().autoIncrement().primaryKey();

is this possible?

도움이 되었습니까?

해결책

Yes, that looks just fine. Depending on your needs entity.addIdProperty() or entity.addIdProperty().autoIncrement() should be fine. addIdProperty will already call primaryKey().

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