--- Jonathon -- Improov <[EMAIL PROTECTED]> wrote: > Chris, > > I can't find the <extend-entity> concept at > http://ofbiz.apache.org/docs/entity.html . But I did >
<extend-entity> is a rather recent edition and that document appears to have been last updated in 2004. While there should probably be a few short words said about it in the wiki(docs.ofbiz.org) at the very least...all documentation is a work in progress. > find a few examples in Content (1), Party (7) and > Product (1) modules. > > Are there some docs on the usage of the > <extend-entity> XML entity? > > We can move this discussion into another thread if > you want. > > But first, let me sneak in a few quick questions! > Thanks! > > How does <extend-entity> work? From looks of it, it > seems to simply add a new field (or fields, or > foreign keys, etc) to an existing table. That's exactly how it works :-) . Don't you just love it when code is implemented the way it looks? Almost give credence to the concept that code should be well written enough so that it doesn't need commenting..._almost, but not really. > The only > effect this seems to achieve is to separate the > stock entity definitions from any custom entity > definitions. So, though we "extend-entity"-ize the > UserLoginHistory entity (in Party module), we still > get 1 (but different) table: UserLoginHistory. > Not UserLoginHistory_custom or UserLoginHistory_attr > in addition to UserLoginHistory. > If you want to create a seperate table for your additions, you can always create a table with a one-to-one relationship with your target table. Unless you're wanting to segregate denormalized data, I'm not sure I see much benefit in doing that over using extend-entity. > But still, this looks absolutely fabulous for > separating my custom entity definitions from OFBiz's > > entity definitions. > > Thanks again, Chris! > > Jonathon >
