[Lift] Re: MappedLong null values

2009-10-12 Thread David Pollak
If you've got a good way to do this, feel encouraged to develop it on a branch. On Sun, Oct 11, 2009 at 8:22 PM, Naftoli Gugenheim naftoli...@gmail.comwrote: It would be nice if there could be a generalized way of specifying optionality for fields.(The first though question is whether the

[Lift] Re: MappedLong null values

2009-10-12 Thread Naftoli Gugenheim
Not offhand, maybe some discussion will generate an good plan.The easiest and worst way would be to have a marker trait or a flag, and test in each MappedXXX. Obviously not a good idea. What may work is to delegate all the code that makes decisions which depend on optionality to a method in

[Lift] Re: MappedLong null values

2009-10-11 Thread Naftoli Gugenheim
It would be nice if there could be a generalized way of specifying optionality for fields.(The first though question is whether the default behavior is consistent -- do all field types equate NULL with their default?) I pasted the names of all the field types (by listing all Mapped*.class files in

[Lift] Re: MappedLong null values

2009-10-07 Thread David Pollak
On Wed, Oct 7, 2009 at 12:55 PM, harryh har...@gmail.com wrote: I have a long field in my database that I want to have a unique index (enforced by the database). Sometimes this field will be empty, in which case I'd like to set it to NULL. 0 won't work because that won't work with the