From my understanding of the spec, you need to have an object that has a
construct which accepts a single string.
Try the following:
@Embeddable
public class PK {
public PK(String initString){
// do something here
}
@Override
public String toString(){
// Stringify your PK if needed
}
}
On Mon, Aug 24, 2009 at 2:14 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> * trying
>>
>> public T select(@PathParam("id") Object login) {
>>>
>>
>> also doesn't work ...
>>
>
> Right, because Object does not give enough information on what type to
> inject.
>
>
> On Aug 22, 2009, at 1:22 PM, Felipe Gaúcho wrote:
>
> I finally adopted "String" as generic type, and by luck it seems to
>> work with the EntityManager :)
>>
>> but I would love to have it in generic format (supporting eventually
>> JPA @Embeddable keys)
>>
>>
> Could you log an issue (when java.net is back up) ?
>
> This will require that type variables are resolved at the level of the
> abstract model to ensure injection will work in all cases.
>
> Paul.
>
>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
--
“If the American people ever allow private banks to control the issue of
their currency, first by inflation, then by deflation, the banks...will
deprive the people of all property until their children wake-up homeless on
the continent their fathers conquered... The issuing power should be taken
from the banks and restored to the people, to whom it properly belongs."
-- Thomas Jefferson
"Government big enough to supply everything...is big enough to take
everything you have. The course of history shows that as a government grows,
liberty decreases" --- Thomas Jefferson
www.CampaignForLiberty.org