From: <leg...@at...> - 2003-08-13 01:25:51
|
The following comment has been added to this issue: Author: abe zafar Created: Tue, 12 Aug 2003 7:32 PM Body: I search the latest code from cvs for "property-type", the only place that I found was something similar "beans-property-type" which does not seem to be relevant to this issue. Is it possible that your latest changes have not been checked in to cvs yet? I got the latest from cvs last night from the HibernateExt module. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-243 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-243 Summary: Polymorphic associations are not handled properly Type: Improvement Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: toolset Fix Fors: 2.1 Versions: 2.0 final Assignee: Max Rydahl Andersen Reporter: abe zafar Created: Sun, 10 Aug 2003 2:54 AM Updated: Sun, 10 Aug 2003 12:04 PM Environment: JDK1.4 Description: If I have an association like this one: <many-to-one classname="com.hp.Printer"/> and Printer does not have a mapping but it is an interface for a class called com.hp.ColorPrinter that does have a mapping, I would get two methods generated as I would expect: public void setPrinter( Printer printer ) { ... } public Printer getPrinter() { ... } But since "com.hp.Printer" was never mapped I would get a rutime exception saying cannot find the mapping. If through some other tag or the <many-to-one> tag itself I can indicate that use the interface type for code generation but use the implementation class to look for the mapping the problem would be solved. For example if we had something like this: <many-to-one compile-time-class="com.hp.Printer" run-time-class="com.hp.ColorPrinter"/> then the setter and getter would be generated using the compile-time-class and the run-time-class would be used to look up the mapping at runtime. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |