isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Óscar Bou - GOVERTIS <o....@govertis.com>
Subject Re: datanucleus foreign key name
Date Fri, 06 Nov 2015 18:06:50 GMT
Hi Jeroen.

Yes, it does. But it's something usual to add that suffix to FK names. 

In fact, most reporting tools try to automatically detect them. So I think it's a good practice
for the DB scheme.

Regards, 

Oscar


> El 6 nov 2015, a las 17:57, Jeroen van der Wal <jeroen@stromboli.it> escribió:
> 
> Indeed it omits _OID but still adds _ID [1]
> 
> [1]
> https://github.com/datanucleus/datanucleus-rdbms/blob/0a769efa72174ee0907f4b9c4d5eb7e5389058d6/src/main/java/org/datanucleus/store/rdbms/identifier/JPAIdentifierFactory.java#L40-L42
> 
> On 6 November 2015 at 14:42, Óscar Bou - GOVERTIS <o.bou@govertis.com>
> wrote:
> 
>> Hi to all.
>> 
>> Not sure and cannot test it now, but the "jpa” naming config. didn’t
>> included those suffixes.
>> 
>> Try it yourself.
>> 
>> Regards,
>> 
>> Oscar
>> 
>> 
>> 
>>>> El 6 nov 2015, a las 14:35, Jeroen van der Wal <jeroen@stromboli.it>
>>> escribió:
>>> 
>>> You can write your own Datanucleus identifier factory [1]: extend
>>> DN2IdentifierFactory and overwrite getColumnIdentifierSuffix
>>> 
>>> [1]
>> http://www.datanucleus.org/documentation/extensions/rdbms_identifier_factory.html
>>> [2]
>> https://github.com/datanucleus/datanucleus-rdbms/blob/0a769efa72174ee0907f4b9c4d5eb7e5389058d6/src/main/java/org/datanucleus/store/rdbms/identifier/DN2IdentifierFactory.java
>>> [3]
>> https://github.com/datanucleus/datanucleus-rdbms/blob/0a769efa72174ee0907f4b9c4d5eb7e5389058d6/src/main/java/org/datanucleus/store/rdbms/identifier/DNIdentifierFactory.java#L621-L649
>>> 
>>> On 6 November 2015 at 13:32, Dan Haywood <dan@haywood-associates.co.uk>
>>> wrote:
>>> 
>>>> Don't know why it does it (it is a rather odd name,  I agree) but iirc
>> you
>>>> can override it using @Column(name=...)
>>>> 
>>>> Check out Estatio, we do it there anyway.
>>>> 
>>>> Cheers, Dan
>>>> On 6 Nov 2015 11:55 am, "Stephen Cameron" <steve.cameron.62@gmail.com>
>>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> Just interested to know if there is any way to stop DataNucleus adding
>>>> _oid
>>>>> to the end of all its generated foreign keys, this it with
>>>>> @PersistenceCapable( identityType = IdentityType.DATASTORE)?
>>>>> 
>>>>> It adds _id_oid to the tail of them all so wondering why?
>>>>> 
>>>>> Thanks
>> 
>> 

Mime
View raw message