1

Closed

Exception occurs when generating for a table with Timestamp column

description

When generating a ActiveRecord class for a table that has a Timestamp column, an exception occurs. No feedback is provided in the UI about an error occuring, it just results in an empty file being generated. However, reviewing the log showed this exception:
 
2009-01-12 16:42:27,735 [7] ERROR Darkside.GeneratorStudio.UI.MainForm [(null)] <(null)> - Invocation of method 'NHibernateTypeString' in Darkside.GeneratorStudio.Library.Domain.Column, template ActiveRecordTemplate.dgt Line 50 Column 55 threw an exception
NVelocity.Exception.MethodInvocationException: Invocation of method 'NHibernateTypeString' in Darkside.GeneratorStudio.Library.Domain.Column, template ActiveRecordTemplate.dgt Line 50 Column 55 threw an exception ---> System.Exception: Unexpected data type: timestamp
at Darkside.GeneratorStudio.Library.Domain.Column.get_NHibernateTypeString()
--- End of inner exception stack trace ---
at NVelocity.Runtime.Parser.Node.ASTIdentifier.Execute(Object o, IInternalContextAdapter context)
at NVelocity.Runtime.Parser.Node.ASTReference.Execute(Object o, IInternalContextAdapter context)
at NVelocity.Runtime.Parser.Node.ASTReference.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.ASTIfStatement.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Directive.Foreach.Render(IInternalContextAdapter context, TextWriter writer, INode node)
at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Template.Merge(IContext context, TextWriter writer)
at Darkside.GeneratorStudio.Library.Generator.ModelGenerator.GenerateClasses()
at Darkside.GeneratorStudio.UI.MainForm.generateBackgroundWorkerThread_DoWork(Object sender, DoWorkEventArgs e)
Closed Jan 19, 2009 at 10:37 AM by TheDarksider
The data type has been included in the helper method(s).

comments