[Lift] Re: Mapper with custom id

2009-08-28 Thread Derek Chen-Becker
I'm probably missing something here, but wouldn't putting those 5 lines of code into a trait work? trait ManualValue { /* allow user-defined primary key */ override def writePermission_? = true override def dbAutogenerated_? = false private var myDirty = false

[Lift] Re: Mapper with custom id

2009-08-25 Thread Naftoli Gugenheim
I had seen that thread, but it doesn't make sense to add all that code to all of my mapper models when they're ordinary mappers with ordinary auto-increment primary keys, which I happen to be importing from the database used by the previous, PHP version of this app. The foreign keys have to

[Lift] Re: Mapper with custom id

2009-08-25 Thread David Pollak
On Tue, Aug 25, 2009 at 7:08 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: I had seen that thread, but it doesn't make sense to add all that code to all of my mapper models when they're ordinary mappers with ordinary auto-increment primary keys, which I happen to be importing from the

[Lift] Re: Mapper with custom id

2009-08-25 Thread Naftoli Gugenheim
It definitely would have been an option, although it would have been more difficult due to the complex structure of the new database. But I want to understand why it can't work the way I thought it would. Anyway, here's the code that I used in the end. There may still be a few bugs but it

[Lift] Re: Mapper with custom id

2009-08-25 Thread David Pollak
On Tue, Aug 25, 2009 at 10:56 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: It definitely would have been an option, although it would have been more difficult due to the complex structure of the new database. But I want to understand why it can't work the way I thought it would. Peter

[Lift] Re: Mapper with custom id

2009-08-25 Thread Naftoli Gugenheim
On Tue, Aug 25, 2009 at 2:31 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Aug 25, 2009 at 10:56 AM, Naftoli Gugenheim naftoli...@gmail.comwrote: It definitely would have been an option, although it would have been more difficult due to the complex structure of the new