You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Bob Hanson <mn...@gmail.com> on 2007/03/09 18:06:49 UTC

cannot use struct with iBatis

iBatis did not work with the following struct:
    public struct LoginAttempt
    {
        /// <summary>
        ///
        /// </summary>
        public Application application;
        /// <summary>
        ///
        /// </summary>
        public string userName;
        /// <summary>
        ///
        /// </summary>
        public bool success;
        /// <summary>
        ///
        /// </summary>
        public DateTime loginDateTime;
        /// <summary>
        ///
        /// </summary>
        public string message;
    }

It works fine if I user class instead of struct (public class LoginAttempt).

The error reported by the debugger:
FatalExecutionEngineError
The runtime has encountered a fatal error. The address of the error
was at 0x79eebbc3, on thread 0x780. The error code is 0xc0000005. This
error may be a bug in the CLR or in the unsafe or non-verifiable
portions of user code. Common sources of this bug include user
marshaling errors for COM-interop or PInvoke, which may corrupt the
stack.

Does iBatis not support using structs?

Re: cannot use struct with iBatis

Posted by chook rib <ch...@gmail.com>.
iBatis.Net not support struct.