Hi all,
Thought I would try out Spring Roo so I've had loads of new fun problems today. Hopefully you guys can help me with latest one. Roo has the ability to generate integration tests for your entities, but most of them fail for me. The most common failure is some form of constraint violation like null is being inserted into non-null fields. I realise that there is nothing on my entity that reflects these constraints in the database.
For instance the Property Entity has a many-to-one relationship with Term
//bi-directional many-to-one association to Term
@ManyToOne
@JoinColumn(name="TERM_ID",)
private Term term;
Changing that to:
//bi-directional many-to-one association to Term
@ManyToOne(optional=false)
@JoinColumn(name="TERM_ID", nullable=false)
private Term term;
Still causes the test to fail so not sure if Roo is clever enough to create a Term entity automatically.
So my question is if I can modify these generated tests without Roo overwriting them on restart? Or should Roo be able to set non-null values?
There really is not much documentation about integration tests and what you can do with the generated classes anywhere. That I could find at least :)
Thanks