Re: [RDBO] How to do hierarchical defaults right?

2006-09-06 Thread Michael Lackhoff
On 5 Sep 2006, John Siracusa wrote: > As for the uniqueness issue, if the combination really is > unique, then why not add a unique key to the database and the class? > Then you can load() speculatively instead of doing a Manager query. That's what I was looking for. Thanks for the hint, I didn't

Re: [RDBO] How to do hierarchical defaults right?

2006-09-05 Thread John Siracusa
On 9/5/06, Michael Lackhoff <[EMAIL PROTECTED]> wrote: > I have written such a method but it looks very clumsy and I think > there must be a more elegant way to do this. This is the code for > just one level up the hierarchy [...] > > And a related question: Is there a manager method for cases wher

[RDBO] How to do hierarchical defaults right?

2006-09-04 Thread Michael Lackhoff
Hello, in my application I have a hierarchy of company, organisational unit and sub-unit. Some data should be configurable on every level but not compulsory on every level. If it is not defined for the sub-unit it should be taken from the unit and if it is not there from the company. An examp