public GeneratedCollectionAliases(IDictionary<string, string[]> userProvidedAliases, ICollectionPersister persister, string suffix)
		{
			this.suffix = suffix;
			this.userProvidedAliases = userProvidedAliases;

			keyAliases = GetUserProvidedAliases("key", persister.GetKeyColumnAliases(suffix));

			indexAliases = GetUserProvidedAliases("index", persister.GetIndexColumnAliases(suffix));

			// NH-1612: Add aliases for all composite element properties to support access
			// to individual composite element properties in <return-property> elements.
			elementAliases = persister.ElementType.IsComponentType
			                 	? GetUserProvidedCompositeElementAliases(persister.GetElementColumnAliases(suffix))
			                 	: GetUserProvidedAliases("element", persister.GetElementColumnAliases(suffix));

			identifierAlias = GetUserProvidedAlias("id", persister.GetIdentifierColumnAlias(suffix));
		}
        public GeneratedCollectionAliases(IDictionary <string, string[]> userProvidedAliases, ICollectionPersister persister,
                                          string suffix)
        {
            this.suffix = suffix;
            this.userProvidedAliases = userProvidedAliases;

            keyAliases = GetUserProvidedAliases("key", persister.GetKeyColumnAliases(suffix));

            indexAliases = GetUserProvidedAliases("index", persister.GetIndexColumnAliases(suffix));

            // NH-1612: Add aliases for all composite element properties to support access
            // to individual composite element properties in <return-property> elements.
            elementAliases = persister.ElementType.IsComponentType
                                                ? GetUserProvidedCompositeElementAliases(persister.GetElementColumnAliases(suffix))
                                                : GetUserProvidedAliases("element", persister.GetElementColumnAliases(suffix));

            identifierAlias = GetUserProvidedAlias("id", persister.GetIdentifierColumnAlias(suffix));
        }
Exemplo n.º 3
0
        public GeneratedCollectionAliases(IDictionary userProvidedAliases, ICollectionPersister persister, string suffix)
        {
            this.suffix = suffix;
            this.userProvidedAliases = userProvidedAliases;

            this.keyAliases = GetUserProvidedAliases(
                "key",
                persister.GetKeyColumnAliases(suffix)
                );

            this.indexAliases = GetUserProvidedAliases(
                "index",
                persister.GetIndexColumnAliases(suffix)
                );

            this.elementAliases = GetUserProvidedAliases("element",
                                                         persister.GetElementColumnAliases(suffix)
                );

            this.identifierAlias = GetUserProvidedAlias("id",
                                                        persister.GetIdentifierColumnAlias(suffix)
                );
        }