Fabio Cepeda

Archive for the ‘Hibernate’ Category

Today, I experienced what I have read in this document from Hibernate a couple of months ago. The importance of the equals() and the hashCode() methods for hibernate when working with collections in persistent objects.
The problem:
I had an object that needed a many-to-many instead of a many-to-one relationship. Since last week I had [...]

Java 5 enum types Mysql, Hibernate, Spring

Posted by: fcepeda on: February 12, 2008

Doubt:
I develop a java web application that uses a lot of type objects. For example, Object Visit has a property state that could be Programmed, Done, Cancelled, etc… The current solution for this is to have a table in the DB representing the state of the visit and a FK from the table visit to [...]

I develop a web application using appfuse, springframework, and hibernate, MySQL . I had the following situation:
I needed to persiste a collection of unique integers for an object. Where the primary Id of the collection table was the primary key of the table mapped by Contacto.
public class Contacto implements java.io.Serializable {
private Integer contactoId; //Primary [...]