dev@jersey.java.net

Re: mapping complex database primary key to UriTemplate

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 02 Oct 2007 11:16:46 +0200

Peter Liu wrote:
>> The templates are quite flexible and you are not limited to one
>> template per path segment. You can have a templates like the following:
>>
>> "{column1},{column2}"
>>
>> "({column1},{column2})"
>>
>> "[{column1}]:[{column2}]"
>>
>> "1={column1},2={column2}"
>>
>> Be careful of using the ';' because Jersey, by default, will think
>> that the path segment contains zero or more matrix parameters, and
>> these will be stripped from the path before matching occurs. This can
>> be viewed as a bug, templates with ';' should override matrix
>> parameters, but off the top of my head this might be rather tricky to
>> fix (the workaround is to turn off matrix param support by setting the
>> feature to false in the resource config).
>>
> Great! You learn something new everyday :-) I think I'll use the comma
> separated list.
>

That would be my choice too :-)

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109