Checkstyle woos
by Galder Zamarreño
Hi,
Yesterday Steve suggested installing Checkstyle IDEA plugin, since Hibernate now adds checks for that.
However, I can't seem to disable the errors it shows in projects where I don't use Checkstyle.
Uninstalling the plugin for the time being. If anyone knows how to avoid Checkstyle interfering in projects where there's no particular Checkstyle guidelines, let me know.
Cheers,
--
Galder Zamarreño
galder(a)redhat.com
twitter.com/galderz
Project Lead, Escalante
http://escalante.io
Engineer, Infinispan
http://infinispan.org
10 years, 12 months
Hibernate field with custom type changes, but object not marked as 'dirty' for update
by Adnan Raza
Hello hibernate-dev,
Currently I am facing issue with hibernate. I have a Entity class as given
below.
@Entity
@Table(name = TABLE_NAME)
@Access(AccessType.FIELD)
public class EntityClass {
//some fields
//*(a)Access(AccessType.PROPERTY)*
*@Column(name = "WA_DEFINED_TAB_INDEXES")*
* @Type(type = SetToArrayUserType.CLASS_NAME)*
private Set<Integer> oracleArray = new HashSet<>(10);
@Version
@Column(name = "versionCol" , nullable = false)
private Integer rhpVersion = 0;
//some getters/setters
}
In case of AccessType.FIELD mapping, Hibernate doesn't mark object as dirty
and doesn't update row when we only have changes in the fields that is
mapped for custom type. If we have AccessType.PROPERTY mapping, Hibernate
do mark object dirty and make update into database.
is it bug in hibernate?
I there is an open question also
http://stackoverflow.com/questions/1268997/hibernate-field-with-custom-ty...
For the solution, either I will be forced use AccessType.PROPERTY or I have
to mix FIELD and PROPERTY approach.
Please let me know your thoughts about this.
--
*With Best Regards,*
*
** Mohd Adnan*
* Software Developer*
*Mobile +91-7498194516 *
10 years, 12 months