[ http://jira.andromda.org/browse/NETCART-4?page=comments#action_13732 ]
Campbell Boucher-Burnet commented on NETCART-4: ----------------------------------------------- regardless, the template should probably leverage what is provided by the metafaces, instead of using "${entity.packageName}.I${entity.entityName}Dao", something like: #set ($generatedFile = "DaoFactory.cs") #if($stringUtils.isNotEmpty($springTypesPackage)) #set ($generatedFile = "${stringUtils.replace($springTypesPackage,'.','/')}/DaoFactory.cs") #end // Name: DaoFactory.cs // license-header cs merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: NSpringDaoFactory.cs.vsl in andromda-nspring-cartridge. #region Using using System; #endregion Using #if ($stringUtils.isNotBlank($springTypesPackage)) namespace $springTypesPackage { #end #region Dao Factory /// <summary> /// Factory for obtaining Dao instances. /// </summary> public class DaoFactory { #region Backing Fields #foreach($entity in $entities) #region m_${entity.entityName}Dao /// <summary> /// Backing field for ${entity.fullyQualifiedDaoName} /// </summary> private static ${entity.fullyQualifiedDaoName} m_${entity.entityName}Dao = null; #endregion #end #endregion #region Factory Methods #foreach($entity in $entities) #region Get${entity.entityName}Dao() /// <summary> /// Factory method to obtain concrete instances of ${entity.fullyQualifiedDaoName}. /// </summary> public static ${entity.fullyQualifiedDaoName} Get${entity.entityName}Dao() { if (m_${entity.entityName}Dao == null) { m_${entity.entityName}Dao = new ${entity.fullyQualifiedDaoImplementationName}(); } return m_${entity.entityName}Dao; } #endregion #end #endregion } #endregion Dao Factory #if ($stringUtils.isNotBlank($springTypesPackage)) } #end > DaoFactory.cs is generated with incorrect namespace with certain project names > ------------------------------------------------------------------------------ > > Key: NETCART-4 > URL: http://jira.andromda.org/browse/NETCART-4 > Project: .NET Cartridges > Type: Bug > Environment: VS2005/.NET typical > Reporter: Chris Micali > Assignee: Naresh Bhatia > Priority: Critical > > When project names have dots in them, the DaoFactory.cs that is generated by > nspring has an incorrect namespace, and it is placed in the wrong folder. > Example: > NI.MeetingBroker.Domain - Core project > NI.MeetingBroker.Shared - Common Project > When i generated my entities with maven, they are all placed in > NI.MeetingBroker.Domain\target\NI\MeetingBroker\Domain, and have the proper > namespace NI.MeetingBroker.Domain. However the DaoFactory.cs is placed in > NI.MeetingBroker.Domain\MeetingBroker\Domain and it's namespace is > MeetingBroker.Domain. For some reason the NI is being droped. This causes a > build break because the namespaces do not match. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV