• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

porting messages into jforum

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi;
i am now in the message porting into jforum.
i found adding data to 3 tables to do the trick(jforum_topics,jforum_posts,jforum_posts_text).

however, there is a last_post_id,first_post_id in the topics table and a topic_id in the posts table. the ids are auto incremented so they are determined by the DB on insert.

how should i insert the data then, is this a 4 phase thing where i should:
1. insert a new topic |(withouth last/first_post_id)
2. insert post
3. insert post text
4. go back to topics tables and update last_first_post_id
???

is this the way or am i missing something
thanks.
[originally posted on jforum.net by gkatz]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They're not auto increment ( just topic_id is ). JForum set the values manually, acording to the posts inserted in the topic.

You're porting the messages from where?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi;
i am porting from my proprietry MessageBoard table into jforum tables structure.
i tool a look again @ jforum_topics and jforum_posts. they both have references to each others primary keys which are auto generated. what did i miss?
[originally posted on jforum.net by gkatz]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, in jforum_posts the post_id is an auto_increment in fact, as well the topic_id in jforum_topics, But the relationship between them is done via SQL or Java code. So, for each jforum_topic where are one to many jforum_posts. You can take a look at src/net/jforum/view/forum/PostAction.java, src/net/jforum/drivers/generic/PostModel.java and src/net/jforum/drivers/generic/TopicModel.java.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic