I ever made a stupid mistake and replaced @Transient with an @XmlTransient, and thought @XmlTransient would do both things. How could I come up with such "thought"?
Obviously, that would throw up tons of unit test failures with the following exceptions:
Caused by: org.hibernate.PropertyAccessException: could not set a field value by reflection setter of uk.co.ondemand.cmm.service.persistence.Product.providerAssetId
......Caused by: java.lang.IllegalArgumentException......The reason of those exceptions is that the unit tests started persisting the field but couldn't find any corresponding values in the test data, say DBUnit. That meant it couldn't insert a value into a field hasn't been defined in the test data.
No comments:
Post a Comment