Gökhan Abatay
2018-11-30 12:32:46 UTC
Hi I need to pass sequence to hql but it gives me error?
sequenceNextValSql taken from dialect and it's value for oracle =
MY_SCHEMA.SEQUENCE_NAME.nextval
string sequenceNextValSql =
ISession.GetSelectSequenceNextValString(BaseEntityMap.DefaultSequenceName);
var query = ISession.CreateQuery(
$@"INSERT INTO {typeof(EodJobRunLog)}(Guid, EodDate,
EodJobDef, ErrorCode, ProcessCount,
StartDateTime, Stat)
SELECT ({sequenceNextValSql}) as Guid E.EodDate,
E.EodJobDef, E.ErrorCode, E.ProcessCount,
E.StartDateTime, E.Stat from {typeof(EodJobRunLog)} AS E");
Invalid path: 'MY_SCHEMA.SEQUENCE_NAME.nextval' [INSERT INTO
I know if i use sequence generator in my mapping everything works as
expected, but i need to use with this way.
sequenceNextValSql taken from dialect and it's value for oracle =
MY_SCHEMA.SEQUENCE_NAME.nextval
string sequenceNextValSql =
ISession.GetSelectSequenceNextValString(BaseEntityMap.DefaultSequenceName);
var query = ISession.CreateQuery(
$@"INSERT INTO {typeof(EodJobRunLog)}(Guid, EodDate,
EodJobDef, ErrorCode, ProcessCount,
StartDateTime, Stat)
SELECT ({sequenceNextValSql}) as Guid E.EodDate,
E.EodJobDef, E.ErrorCode, E.ProcessCount,
E.StartDateTime, E.Stat from {typeof(EodJobRunLog)} AS E");
Invalid path: 'MY_SCHEMA.SEQUENCE_NAME.nextval' [INSERT INTO
I know if i use sequence generator in my mapping everything works as
expected, but i need to use with this way.
--
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 nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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 nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.