I'm trying to access TABLE_NAME
from ProductTable
in ProductImageTable
to put it in the query. I've searched everywhere on how to access it and so far I've found nothing. I would appreciate some help, please :)
Here's a snippet of the code :
abstract inner class ProductTable : Table() {
val TABLE_NAME: String = "product"
}
abstract inner class ProductImageTable : Table() {
val SQL_CREATE_TABLE : String = "CREATE TABLE $TABLE_NAME" +
" ($_ID$ID_TYPE_AUTO_INC$COMMA_SEP" +
"$COLUMN_PRODUCT_UUID$TEXT_TYPE_NOT_NULL$COMMA_SEP" +
"$COLMUN_LOCAL_IMAGE_FILE$TEXT_TYPE_NOT_NULL_EMPTY$COMMA_SEP" +
"$COLUMN_SERVER_IMAGE_URL$TEXT_TYPE_NOT_NULL_EMPTY$COMMA_SEP" +
"FOREIGN KEY($COLUMN_PRODUCT_UUID) REFERENCES ${ProductTable.TABLE_NAME}(${ProductTable.COLUMN_PRODUCT_UUID}) ON UPDATE CASCADE ON DELETE CASCADE)"
}