David Pollak <[email protected]> writes:

> On Mon, Feb 8, 2010 at 12:54 PM, Jeppe Nejsum Madsen <[email protected]>wrote:
>
>> Hi,
>>
>> How can I create a List of MappedField from different Mappers:
>>
>> I want to create a function like this:
>>
>> def requiredFields(mfs: List[MappedField[_,Any]])
>>
>
> Does this not work?

Well, the definition works, but

>> and call it like this
>>
>> requiredFields(List(Table1.field1, Table2.field2))

The call generated a huge type error. But changing the definition to

def requiredFields(mfs: List[MappedField[_,_]])

seems to work. It looks like, for reasons that are not entirely clear to
me that the compiler tries to apply the implicit mapToType in this case:

val mf: MappedField[_,Any] = Table1.column1

and then complains:

[INFO]  found   : Int
[INFO]  required: net.liftweb.mapper.MappedField[_, Any]

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to