Title:
Bug 80424:one-to-one Primary key association does not work in MS-SQL 2005 (or other version)
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)
Created: 10/20/2009
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Minor / Unknown
Locale/System: English / Win All
Vote Count: 2
Problem:
one-to-one Primary key association does not work in MS-SQL 2005 (or other version).
Method:
Follow the code in http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS5FFD2854-7F18-43ea-B383-161E007CE0D1.html#WS606584AD-43B2-48c1-B9E6-69A670694BBB<!--- EMPLOYEE.cfc ---><cfcomponent persistent="true" table="Employee"> <cfproperty name="id" fieldtype="id" generator="native"> <cfproperty name="firstname"> <cfproperty name="lastname"> <cfproperty name="officecubicle" fieldtype="one-to-one" cfc="OfficeCubicle"> </cfcomponent><!--- OFFICECUBICLE.cfc ---><cfcomponent persistent="true" table="OfficeCubicle"> <cfproperty name="id" fieldtype="id" generator="foreign" params="{property='Employee'}"> <cfproperty name="Employee" fieldtype="one-to-one" cfc="Employee" constrained="true"> <cfproperty name="Location"> <cfproperty name="Size"> </cfcomponent>
Result:
Error Occurred While Processing Request[Macromedia][SQLServer JDBC Driver][SQLServer]'FK2841E3C74AFD57E9' is not a constraint. Stack Tracejava.sql.SQLException: [Macromedia][SQLServer JDBC Driver][SQLServer]'FK2841E3C74AFD57E9' is not a constraint.at macromedia.jdbc.sqlserverbase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseExceptions40.createSQLException(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseExceptions.createException(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseExceptions.getException(Unknown Source)at macromedia.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)at macromedia.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)at macromedia.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)at macromedia.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseStatement.commonTransitionToState(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseStatement.postImplExecute(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseStatement.commonExecute(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseStatement.executeUpdateInternal(Unknown Source)at macromedia.jdbc.sqlserverbase.BaseStatement.executeUpdate(Unknown Source)at coldfusion.server.j2ee.sql.JRunStatement.executeUpdate(JRunStatement.java:182)at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:383)at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:358)at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:258)at coldfusion.orm.hibernate.HibernateConfiguration.exportSchema(HibernateConfiguration.java:366)at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:221)at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:141)at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:69)at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:182)at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:85)at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:475)at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:221)at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)at coldfusion.CfmServlet.service(CfmServlet.java:200)at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)at jrun.servlet.FilterChain.service(FilterChain.java:101)at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040330
External Customer Info:
External Company:
External Customer Name: Henry Ho
External Customer Email: 237A22C24921EDF5992015B9
External Test Config: 10/20/2009
Attachments:
Comments: