예제 #1
0
        protected internal static MyBatisTableMapping getTableMapping(string relation)
        {
            MyBatisTableMapping mapping = mappings[relation];

            if (mapping == null)
            {
                throw LOG.missingRelationMappingException(relation);
            }

            return(mapping);
        }
예제 #2
0
        public static string tableAlias(string relation, int index)
        {
            if (string.ReferenceEquals(relation, null))
            {
                return("RES");
            }
            else
            {
                MyBatisTableMapping mapping = getTableMapping(relation);

                if (mapping.OneToOneRelation)
                {
                    return(mapping.TableAlias);
                }
                else
                {
                    return(mapping.TableAlias + index);
                }
            }
        }
예제 #3
0
        public static string tableMapping(string relation)
        {
            MyBatisTableMapping mapping = getTableMapping(relation);

            return(mapping.TableName);
        }