Hello!

I'm trying to integrate hibernate into my web service.

I found one problem related with the relation of the DDBB. I have one
table called "locations" that have 4 columns for primary key, name,
network_name, network_type_id, country_id. Another table called
"muxes" is referenced to "locations" with a foreign key called
"locatioon_id" that is selecting "id" from "locations" table.

When I execute HQL I found this problem:

org.hibernate.MappingException: Foreign key (FK637007E11D64F93:muxes
[location_id])) must have same number of columns as the referenced
primary key (locations [name,network_name,network_type_id,country_id])
        at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:90)
        at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
        at
org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:
1263)
        at
org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:
1170)
        at
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:
324)
        at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:
1286)
        at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:
859)

I don't know which modification I have to include to mapping files, in
order to solve this problem.
Can you help me???

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to