[ http://jira.andromda.org/browse/HIB-161?page=history ] Chad Brandon closed HIB-161: ----------------------------
Resolution: Fixed > Duplicate create() methods created in HibernateEntity.vsl > --------------------------------------------------------- > > Key: HIB-161 > URL: http://jira.andromda.org/browse/HIB-161 > Project: Hibernate Cartridge > Type: Bug > Versions: 3.2-RC1 > Reporter: Steve Jerman > Assignee: Chad Brandon > Fix For: 3.2-RC1 > > If no parameters are defined for a class (e.g abstract superclass) then > duplicate create methods are created: > /** > * Constructs new instances of [EMAIL PROTECTED] > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTP}. > */ > public static final class Factory > { > /** > * Constructs a new instance of [EMAIL PROTECTED] > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTP}. > */ > public static > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTP newInstance() > { > return new > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTPImpl(); > } > /** > * Constructs a new instance of [EMAIL PROTECTED] > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTP}, taking all > possible properties > * (except the identifier(s))as arguments. > */ > public static > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTP newInstance() > { > final > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTP entity = new > com.cisco.nm.cto.AccessPoints.TerminationPoints.NetworkLayerTPImpl(); > return entity; > } > } > Suggested fixes: > add > #if (!$entity.allProperties.empty) > .. > #end > around second method in template or don't populate the creat methods at all. > Does it make sense to have a create for an abstract class? ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click