문제

I am generating annotated pojos via hibernate code generation in eclipse. Classes are generated fine, but class for views are composed of @EmbeddedId and i dont want that. I want to have attributes directly in this class. I found an option "Generate basic typed composite ids" in generation dialog, but when i uncheck it, it would generate view classes with @EmbeddedId too, but will not generate corresponding Id classes. Is there a way to generate these classes without @EmbeddedId?

도움이 되었습니까?

해결책

I used from this: Hibernate Pojo Generator and the result was exactly what wanted.

다른 팁

The @EmbeddedId annotation is generated if the associated table doesn't have a primary key. So just set a primary key and re-generate the code.

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