When I use this entity class, and the table named TOPIC doesn't exist in the database, hibernate creates it. That's OK.
But, I want hibernate to create tables for each topic that users open, and use the preceding entity class to manipulate the messages of all the topics.
How should I do it?
And, anyway... What do you think about the schema? I know it's very very simple. Is there any idea how I can improve it?
Thanks in advance!
John de Michele
posted 6 years ago
I would think a better schema would be to have a topics table, and a messages table, with a one-to-many relationship between them. It seems to me that would scale better if your board got a lot of posts and topics.