Nov 2 2005

Arf - What's Next

Posted by Joe Rinehart at 4:54 PM
3 comments
- Categories: Arf!

I wanted this Arf! tool yesterday, so I'm pouring in my own time to it. Tonight I'm going to be working on a few new things: HasOne(), BelongsToMany(), optional cascading deletes on HasOne/Many properties, and some other minor improvements.

After I knock these out, I'll be going back and looking at some database portability issues people have reported.

Expect to see much movement in SVN this evening.

Comments

Per

Per wrote on 11/02/05 7:48 PM

Joe, just shout out if you want some grunt work done.
David A Cheslow

David A Cheslow wrote on 01/09/06 1:18 AM

Could you please explain how to do two things (these might make great examples):

(1) relate two tables in more than one way - e.g. Person has-a (home)Address and has-a (work)Address. From what I can tell, this seems possible, but I am unclear how to represent it. Taking this a step further, can I relate a table to itself? e.g. Employee has-a (manager)Employee

(2) represent a many-to-many relationship - e.g. User has-many Role and Role has-many User... my question really has to do with how to inform the ARF that there is a table called user_role... maybe I just don't understand the sytax well enough yet.

Thanks for a very interesting tool... just getting into it and I like what I see.

=dave=
David A Cheslow

David A Cheslow wrote on 01/09/06 1:45 AM

ooops... found a comment that explains #2 above... thanx. still working on #1.

In response to the question about handling trees... it is quite simple to represent a tree using self joins. Like the employee/manager relationship, simply add a ParentID which points to another tree node in the same table. The root of the tree has a null ParentID. finding children and parents is easy and can be done entirely in SQL. Finding more distant ancestors and descendants is hard (but not impossible) to do in pure SQL but can be accomplished easily using recursion

=dave=

Write your comment



(it will not be displayed)