You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by amulya rattan <ta...@gmail.com> on 2011/08/12 09:28:17 UTC

Setting value for Primary key

Hi All,

Why doesn't cayenne allow user to be able to set the primary key value by
themselves? Whatever attribute is set as a primary key, doesn't appear in
the classes generated by Cayenne. What's the reasoning behind this? Any
response is appreciated.

~Amulya

Re: Setting value for Primary key

Posted by Andrus Adamchik <an...@objectstyle.org>.
If I am not mistaken, we do have this option during reverse engineering. We may also need it for "sync" function.

Andrus

On Aug 12, 2011, at 8:05 PM, gilbertoca wrote:

> 
> Michael Gentry-2 wrote:
>> 
>> Maybe have an option in Cayenne Modeler to map/expose PKs in
>> ObjEntity?  I suspect people are poking around in CM to figure out why
>> it isn't there and if they see an option they can select, that might
>> help a lot.
>> 
> 
> I agree with Michael!
> 
> +1
> 
> Regards,
> 
> Gilberto
> 
> --
> View this message in context: http://cayenne.195.n3.nabble.com/Setting-value-for-Primary-key-tp3248547p3249864.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
> 


Re: Setting value for Primary key

Posted by gilbertoca <gi...@gmail.com>.
Michael Gentry-2 wrote:
> 
> Maybe have an option in Cayenne Modeler to map/expose PKs in
> ObjEntity?  I suspect people are poking around in CM to figure out why
> it isn't there and if they see an option they can select, that might
> help a lot.
> 

I agree with Michael!

+1

Regards,

Gilberto

--
View this message in context: http://cayenne.195.n3.nabble.com/Setting-value-for-Primary-key-tp3248547p3249864.html
Sent from the Cayenne - User mailing list archive at Nabble.com.

Re: Setting value for Primary key

Posted by Michael Gentry <mg...@masslight.net>.
Maybe have an option in Cayenne Modeler to map/expose PKs in
ObjEntity?  I suspect people are poking around in CM to figure out why
it isn't there and if they see an option they can select, that might
help a lot.

mrg


On Fri, Aug 12, 2011 at 4:33 AM, Aristedes Maniatis <ar...@maniatis.org> wrote:
> On Fri Aug 12 17:40:11 2011, Andrus Adamchik wrote:
>>
>> Cayenne does allow user to have meaningful PK. In the Modeler map an
>> ObjAttribute for your PK DbAttribute, and you should be all set.
>>
>> Andrus
>>
>>
>> On Aug 12, 2011, at 10:28 AM, amulya rattan wrote:
>>
>>> Hi All,
>>>
>>> Why doesn't cayenne allow user to be able to set the primary key value by
>>> themselves? Whatever attribute is set as a primary key, doesn't appear in
>>> the classes generated by Cayenne. What's the reasoning behind this? Any
>>> response is appreciated.
>>>
>>> ~Amulya
>
> We need to make this section of the manual much bigger and clearer in the
> new docbook version. I'd say this is the number one question on this list.
>
> Ari
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>

Re: Setting value for Primary key

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On Fri Aug 12 17:40:11 2011, Andrus Adamchik wrote:
> Cayenne does allow user to have meaningful PK. In the Modeler map an ObjAttribute for your PK DbAttribute, and you should be all set.
> 
> Andrus
> 
> 
> On Aug 12, 2011, at 10:28 AM, amulya rattan wrote:
> 
>> Hi All,
>>
>> Why doesn't cayenne allow user to be able to set the primary key value by
>> themselves? Whatever attribute is set as a primary key, doesn't appear in
>> the classes generated by Cayenne. What's the reasoning behind this? Any
>> response is appreciated.
>>
>> ~Amulya

We need to make this section of the manual much bigger and clearer in 
the new docbook version. I'd say this is the number one question on 
this list.

Ari

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Re: Setting value for Primary key

Posted by Andrus Adamchik <an...@objectstyle.org>.
Cayenne does allow user to have meaningful PK. In the Modeler map an ObjAttribute for your PK DbAttribute, and you should be all set.

Andrus


On Aug 12, 2011, at 10:28 AM, amulya rattan wrote:

> Hi All,
> 
> Why doesn't cayenne allow user to be able to set the primary key value by
> themselves? Whatever attribute is set as a primary key, doesn't appear in
> the classes generated by Cayenne. What's the reasoning behind this? Any
> response is appreciated.
> 
> ~Amulya