0

Hello I want to create class that is bassed on mm table with some special fields. I`m writing plugin that is some kind of message plugin and now I want to mark in mm table (message_frontenduser_mm) is message is read by user and the creation date for each user. So I've created Model in my ext and mapping for this table

config.tx_extbase.persistence.classes {
Tx_Messages_Domain_Model_UserMessage {
    mapping {
        table = tx_messages_message_frontenduser_mm
        recordType = Tx_Messages_Domain_Model_UserMessage
        columns {
            uid_local.mapOnProperty = message
            uid_foreign.mapOnPropery = user
            is_read.mapOnProperty = isRead
            creation_date.mapOnProperty = creationDate
        }
    }
}
}

But in every query T3 is tring to look in tx_messages_domain_model_usermessage table not in tx_messages_message_frontenduser_mm

What am I doing wrong ? How can I map class on this table ?

Below sql of my mm table

CREATE TABLE tx_messages_message_frontenduser_mm (
uid int(11) unsigned DEFAULT '0' NOT NULL,
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
is_read tinyint(1) unsigned DEFAULT '0' NOT NULL,
creation_date int(11) unsigned DEFAULT '0' NOT NULL,
record_type varchar(255) DEFAULT '' NOT NULL,

sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
Fixus
  • 4,631
  • 10
  • 38
  • 67

1 Answers1

0

I Found the problem

it is

tableName = my_table

not

table = my_table

lol :D

Fixus
  • 4,631
  • 10
  • 38
  • 67