[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread Vesa
I doubt I can find one, but it still feels awkward having to type the name of the class so many times. Another option could be to use some shared object to do this stuff, but I guess it wouldn't be as neat to use it then. - Vesa On 2 marras, 18:33, David Pollak feeder.of.the.be...@gmail.com

[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread Vesa
By the way, why orm classes need to be aware of the companion object? Could this dependency be eliminated somehow? - Vesa On 2 marras, 22:02, Vesa brut...@gmail.com wrote: I doubt I can find one, but it still feels awkward having to type the name of the class so many times. Another option

[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread Jim Barrows
On Mon, Nov 2, 2009 at 1:16 PM, Vesa brut...@gmail.com wrote: By the way, why orm classes need to be aware of the companion object? Could this dependency be eliminated somehow? The Mapper/Record companion object is where the code to do all the DB stuff lives. These are all static methods,

[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread Naftoli Gugenheim
What's stopping the instances from managing themselves? - Jim Barrowsjim.barr...@gmail.com wrote: On Mon, Nov 2, 2009 at 1:16 PM, Vesa brut...@gmail.com wrote: By the way, why orm classes need to be aware of the companion object? Could this dependency be

[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread David Pollak
On Mon, Nov 2, 2009 at 12:26 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: What's stopping the instances from managing themselves? There's a lot of start-up cost associated with the reflection used to determine what stuff is fields, etc. Doing that for each instance would destroy

[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread Naftoli Gugenheim
I hear that. If you query 1000 items the reflection shouldn't need to be done 1000 times! But can't the instances locate the companion via reflection, i.e., look for the class with the same name with a trailing '$'? Of course it would break code--they would have to delete their definition or

[Lift] Re: Why no default with getSingleton?

2009-11-02 Thread David Pollak
On Mon, Nov 2, 2009 at 12:36 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: I hear that. If you query 1000 items the reflection shouldn't need to be done 1000 times! But can't the instances locate the companion via reflection, i.e., look for the class with the same name with a trailing