Fran, how have you mapped it?
We are using fluent nhibernate and we try this:
Id(x => x.Id).Column("ID").GeneratedBy.GuidComb();
it is not working. In the Oracle it is generating a key like this:
"D3CCAC3449579D4EB7FAA6E500ECC5A0"
On Fri, Dec 23, 2016 at 2:20 PM, Fran Knebels <[email protected]> wrote:
> Richardo is correct. I've used RAW(16) before for Guid's in Oracle.
>
> Easy way to verify is to generate the schema from your mappings.
>
> On Fri, Dec 23, 2016 at 11:19 AM, Felipe Oriani <[email protected]>
> wrote:
>
>> Ricardo,
>>
>> We have success implementing an IUserType but we are not sure what is the
>> best appoach. We will try using RAW(16). the problem is that Oracle
>> generates an GUID without "-", which is not the default for .Net.
>>
>>
>>
>> On Fri, Dec 23, 2016 at 12:33 PM, Ricardo Peres <[email protected]>
>> wrote:
>>
>>> In Oracle, a GUID is defined as RAW(16).
>>>
>>> RP
>>>
>>> On Friday, December 23, 2016 at 12:22:24 PM UTC, Felipe Oriani wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> We have a table on the database where we want to map the ID as Guid.
>>>> Our project should run over two databases, Sql Server and Oracle. For Sql
>>>> Server, we define the column type as *uniqueidentifier* and it works
>>>> fine. For Oracle, we try to define it as char(36), raw(36), varchar2(36)
>>>> but it does not work properly.
>>>>
>>>> After the commit of the transaction, NHibernate generate an ID
>>>> different what we have on the ID property of the model mapped.
>>>>
>>>> We are mapping it using Fluent NHibernate:
>>>>
>>>> Id(x => x.Id).Column("ID").GeneratedBy.GuidComb();
>>>>
>>>> The question is, how can we map it on Oracle? What is the best column
>>>> dataType to define? Should we create an IUserType to map it?
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ______________________________________
>>>> Felipe B Oriani
>>>> [email protected]
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "nhusers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/nhusers.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> ______________________________________
>> Felipe B Oriani
>> [email protected]
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/nhusers.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>
--
______________________________________
Felipe B Oriani
[email protected]
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.