I'm trying to figure out the "best" way to handle comments in a table, when I want the "top" comment to be the parentId. Should I restructure the DB to make all "Comments" and "Articles" -> "Posts" with a type field? At that point, the top parentId for nesting the comments would be the ArticleId itself.
Right now the database is setup with Articles and a Comments tables. The Comments table has a link to itself for a parentId. I was planning to set the parentId = null if it was a top level comment for nesting purposes, but it's not the simplest thing to do in RIFE, since the type is int and null definitely doesn't fit inside an int. Right now, I was planning to set the constraint to sparse and then manually execute an Insert() if the Id is -1, but I've had a hard time figuring out how to execute the Insert() cleanly through RIFE. So, 1) should I just refactor or 2) should I stay how I am (if so, how do I execute an update or stuff a null into an int?). Cheers, Tyler P.S. I'd prefer to stick to whatever the norm in the market is for nested comments under Articles, if there is such a thing. _______________________________________________ Rife-users mailing list [email protected] http://lists.uwyn.com/mailman/listinfo/rife-users
