[CDBI] uniqueness of objects in memory??
phil at 2people.org
Mon Oct 24 20:35:48 BST 2005
On 10/24/05, Perrin Harkins <perrin at elem.com> wrote:
> On Mon, 2005-10-24 at 10:42 -0700, Phil Mitchell wrote:
> > I am surprised to find that I can rip out all the relationships
> > (except has_a(Prefs) of course) and triggers and still get this
> > result. Here's the boiled-down CDBI portions of my three classes
> I think you'd need to supply a sample of code that actually uses these
> and exhibits the bug, i.e. a failing test.
==Not sure how to do this in a meaningful way. This is a typical web
app (on Catalyst) ... so is distributed across MVC. I'll think more
Something does look odd here
> > User, Prefs, and Page -- User and Prefs are both subclasses of Page.
> It's not common to subclass a class that defines a table and columns.
> I'm not confident that it will work. Does the problem still exist if
> you copy the table and column setup into the other classes and remove it
> from the base class?
Yes, it does.
I didn't realize this was that unusual -- I thought CDBI was set up to
support inheritance within the model. In my design, it's pretty
important to be able to define a set of base columns, rships, and
triggers that all subclasses share ... Anyhow, I did try moving the
CDBI code into the subclasses, and still see this problem.
There's a very simple workaround to this particular issue. But does it
suggest to you that something's hairily wrong? My app is fairly far
along, and otherwise working fine...
> - Perrin
2People Blog: http://2-people.blogspot.com/
2People site: http://www.2people.org
More information about the ClassDBI