This is Error trace:

ERROR freemarker.runtime - 
Method public java.lang.String
org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateJoinColumnsAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration)
threw an exception when invoked on Entity: org.webmeiker.model.Localidades
The problematic instruction:
----------
==> ${pojo.generateJoinColumnsAnnotation(property)} [on line 11, column 15
in appfuse/model/Ejb3PropertyGetAnnotation.ftl]
 in include "Ejb3PropertyGetAnnotation.ftl" [on line 1, column 1 in
appfuse/model/GetPropertyAnnotation.ftl]
 in include "GetPropertyAnnotation.ftl" [on line 9, column 5 in
appfuse/model/PojoPropertyAccessors.ftl]
 in include "PojoPropertyAccessors.ftl" [on line 9, column 1 in
appfuse/model/Pojo.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.lang.String
org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateJoinColumnsAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration)
threw an exception when invoked on Entity: org.webmeiker.model.Localidades
        at 
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
----------------------------------------------------------

Just several observations:

-       No model class Localidades is created anywhere.
-       Provincias model class under
‘target/appfuse/generated-sources/org/webmeiker/model’ path and only under
that path is ‘refactorized’ to add Localidad(es) Set. I mean, Provincias
class under ‘src/main/java/org/webmeiker/model’ isn’t touched.

Finally, this is the code of that refactorized Provincias model class
(inside target/…/…):
package org.webmeiker.model;

/* imports omitted */

@Entity
@Table(name="provincias",catalog="pro1")
public class Provincias extends BaseObject implements Serializable {
    private Long id;
    private String nombre;
    private Set<Localidades> localidadeses = new HashSet<Localidades>(0);

    @Id @GeneratedValue(strategy=IDENTITY) @GeneratedValue(strategy =
GenerationType.AUTO)    
    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    @Column(name="nombre", nullable=false, length=50)
    public String getNombre() {
        return this.nombre;
    }
    
    public void setNombre(String nombre) {
        this.nombre = nombre;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY,
mappedBy="provincias")
    public Set<Localidades> getLocalidadeses() {
        return this.localidadeses;
    }
    
    public void setLocalidadeses(Set<Localidades> localidadeses) {
        this.localidadeses = localidadeses;
    }

/* equals, toString and hashCode omitted */

}

Thanks!

-- 
View this message in context: 
http://appfuse.547863.n4.nabble.com/Incorporate-a-search-region-handling-tables-with-foreign-keys-tp2714244p2952303.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to