380 const std::vector<std::string>& parentColumns = parentElement.
columnNames();
381 if( parentColumns.empty()){
382 throwException(
"No column name found in the parent mapping element.",
"ArrayMapping::process");
385 std::vector<std::string> columns;
388 std::vector<std::string>::const_iterator iColumn = parentColumns.begin();
391 for ( ;iColumn != parentColumns.end(); iColumn++ ) {
400 std::string arrayScopeNameForSchema = scopeNameForSchema;
401 if( !arrayScopeNameForSchema.empty() ) arrayScopeNameForSchema +=
"_";
402 arrayScopeNameForSchema += attributeNameForSchema;
411 if( singleItemContainer ){
414 else if ( associativeContainer ) {
418 throwException(
"Cannot not resolve the type of the key item of container \""+
m_type.Name(Reflex::SCOPED)+
"\".",
419 "ArrayMapping::process");
425 "ArrayMapping::process");
429 throwException(
"Cannot not resolve the type of the content item of container \""+
m_type.Name(Reflex::SCOPED)+
"\".",
430 "ArrayMapping::process");
436 std::auto_ptr<IRelationalMapping> keyProcessor( mappingFactory.newProcessor( keyType ) );
437 keyProcessor->process( me, keyTypeName, keyTypeNameForSchema, arrayScopeNameForSchema );
441 std::auto_ptr<IRelationalMapping> contentProcessor( mappingFactory.newProcessor( contentType ) );
442 contentProcessor->process( me, contentTypeName, contentTypeNameForSchema, arrayScopeNameForSchema );
static std::string arrayMappingElementType()
Returns the name of the array mapping element type.
bool isTypeAssociativeContainer(const Reflex::Type &typ)
static std::string variableNameForContainerKey()
bool isTypePVector(const Reflex::Type &typ)
bool insertColumns(const std::string &tableName, const std::vector< std::string > &columns)
static std::string variableNameForContainerValue()
MappingElement & appendSubElement(const std::string &elementType, const std::string &variableName, const std::string &variableType, const std::string &tableName)
TableRegister & m_tableRegister
Reflex::Type containerDataType(const Reflex::Type &typ)
static std::string columnNameForPosition()
void insertTable(const std::string &tableName)
static std::string newNameForArraySchemaObject(const std::string &initialName, unsigned int index, size_t maxLength)
static std::string columnNameForId()
const std::vector< std::string > & columnNames() const
Reflex::Type containerKeyType(const Reflex::Type &typ)
Reflex::Type containerValueType(const Reflex::Type &typ)
Reflex::Type resolvedType(const Reflex::Type &typ)
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
static std::string OraArrayMappingElementType()
Returns the name of the ORA array mapping element type.
bool isTypeNonAssociativeContainer(const Reflex::Type &typ)
static const size_t MaxTableNameLength
bool checkTable(const std::string &tableName)
std::string className(const T &t)
void setColumnNames(const std::vector< std::string > &columns)
bool isTypeQueryableVector(const Reflex::Type &typ)