[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-397) Incomplete AnnotationException at org.hibernate.cfg.annotations.TableBinder
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Fri Aug 25 18:21:24 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-397?page=all ]
Emmanuel Bernard resolved ANN-397:
----------------------------------
Fix Version: 3.2.0
Resolution: Fixed
Assign To: Emmanuel Bernard
> 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
> Assignee: Emmanuel Bernard
> Fix For: 3.2.0
>
>
> 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
More information about the hibernate-issues
mailing list