[ http://jira.andromda.org/browse/HIB-139?page=history ] Carlos Cuenca closed HIB-139: -----------------------------
Resolution: Fixed Fix Version: 3.2-RC1 Fixed. Thanks you very much. > foreign key relationships buggy in inheritance strategy "class" > --------------------------------------------------------------- > > Key: HIB-139 > URL: http://jira.andromda.org/browse/HIB-139 > Project: Hibernate Cartridge > Type: Bug > Versions: 3.1-RC1 > Reporter: tequila > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > Attachments: HibernateAssociationEndLogicImpl.java, patch.txt > > when using the inheritance strategy "class", the not-null attribute of > foreign key columns is not being set correctly. the problem is located in > HibernateAssociationEndLogicImpl.isRequired(). the following logic tests if > the foreign key column should be nullable: > Object type = this.getType(); > HibernateEntity entity = (HibernateEntity)type; > entity.isHibernateInheritanceClass() && (entity.getGeneralization() != null) > the bottom expression tests the wrong end of the association for the presence > of a superclass. in order to fix this, the first line should be replaced with: > Object type = this.getOtherEnd().getType(); > jira is down at the moment, so i wasn't able to post this bug there. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click