From: Diego P. P. (JIRA) <no...@at...> - 2006-07-23 03:08:17
|
Incomplete AnnotationException at org.hibernate.cfg.annotations.TableBinder --------------------------------------------------------------------------- Key: ANN-397 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-397 Project: Hibernate Annotations Type: Improvement Components: binder Versions: 3.2.0.cr1 Reporter: Diego Pires Plentz When a mapped class has the wrong number of fk collumns, an exception is throwed, but it doesnt say nothing about what class is mapped wrongly. //implicit case, we hope PK and FK columns are in the same order if ( columns.length != referencedEntity.getIdentifier().getColumnSpan() ) { throw new AnnotationException( "A Foreign key refering " + referencedEntity.getEntityName() + " has the wrong number of column. should be " + referencedEntity.getIdentifier() .getColumnSpan() ); } Can become something like this... //implicit case, we hope PK and FK columns are in the same order if ( columns.length != referencedEntity.getIdentifier().getColumnSpan() ) { throw new AnnotationException( associatedClass.getEntityName() + " has a foreign key refering " + referencedEntity.getEntityName() + " with the wrong number of column. should be " + referencedEntity.getIdentifier() .getColumnSpan() ); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |