[This is second email I send, I think the first one get lost] Hi all, I've been searching on docs/maillist about how to persist an already existent pojo, but have no luck. Let me explain: we have two old projects build with hibernate 2.1.8 and all model are marked with hibernate tag on doc area in java source [1]. But now we want to use those models with cayenne (3.0M1) without edit them. Is that possible?
These systems included the business and data access in the same place. So turning it impossible to change the domain logic. By the way, someone can suggest a good design separation of package? We are now trying this: br.to.gov.secad.<module>.model; br.to.gov.secad.<module>.dao; br.to.gov.secad.<module>.service; Thanks! Gilberto PS.: I think we won the battle about ORM choice. Now comes the new one: beat the eclipse hibernate tools! Thanks all for help! [1] [code] /** * Área de atuação do curso: informática, RH, financeira, etc. * @hibernate.class table="scc.scc_area" */ public class Area implements Serializable { /** identifier field */ private Integer cdArea; /** persistent field */ private String dcArea; /** full constructor */ public Area(Integer cdArea, String dcArea) { this.cdArea = cdArea; this.dcArea = dcArea; } /** default constructor */ public Area() { } /** * @hibernate.id generator-class="sequence" column="cdarea" unsaved-value = "null" * @hibernate.generator-param name = "sequence" value = "scc.scc_area_sequence" * @return Integer */ public Integer getCdArea() { return this.cdArea; } public void setCdArea(Integer cdarea) { this.cdArea = cdarea; } /** * @hibernate.property column="dcarea" length="40" not-null="true" * */ public String getDcArea() { return this.dcArea; } [/code]