DataAccess.Server = "..."; DataAccess.Username = "..."; DataAccess.Password = "..."; DataAccess.ServiceName = "XE"; DataAccess.Schema = "..."; DataAccess.Port = 1521; DataAccess.DataBaseType = DatabaseTypeEnum.Oracle10g;
string connString = String.Format( "user id={0};password={1};data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST={2})(PORT={3}))(CONNECT_DATA=(SERVICE_NAME={4})))", Username, Password, Server, Port, ServiceName); _sessionFactory = Fluently.Configure() .Database(OracleClientConfiguration.Oracle10 .ConnectionString(c => c.Is(connString)) .ShowSql()) .ExposeConfiguration(c => c.SetProperty("generate_statistics", "true")) .Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly())) .BuildSessionFactory();------------------------------------------------------Mapping:public RemitMap() { Table("EI_REMIT"); LazyLoad(); Id(x => x.Id) .Column("ID") .CustomType("Int32") .Access.Property() .CustomSqlType("NUMBER") .Not.Nullable() .Precision(38) .GeneratedBy.Sequence("EI_REMIT_ID_SEQ"); Map(x => x.Sequence) .Column("SEQUENCE") .CustomType("Int32") .Access.Property() .Generated.Never() .CustomSqlType("NUMBER") .Not.Nullable() .Precision(38); References(x => x.RemitStatus) .Class<RemitStatus>() .Access.Property() .Cascade.None() .LazyLoad() .Columns("EI_REMIT_STATUS_ID"); References(x => x.Tag) .Class<Tag>() .Access.Property() .Cascade.None() .LazyLoad() .Columns("EI_TAG_ID");}}---------------------------------------------------------------------------Entity:public partial class Remit{ private Int32 _Id; private Int32 _Sequence; private RemitStatus _RemitStatus; private Tag _Tag;public virtual Int32 Id { get { return this._Id; } set { this._Id = value; } }public virtual Int32 Sequence{ get { return this._Sequence; } set { this._Sequence = value; } }public virtual RemitStatus RemitStatus { get { return this._RemitStatus; } set { this._RemitStatus = value; } }public virtual Tag Tag { get { return this._Tag; } set { this._Tag = value; } }}--------------------------------------------------------Code:
Remit remit = new Remit(); remit.Tag = _tagDao.FindById<Tag>("Id", (Int32)_id); remit.RemitStatus = _remitStatusDao.FindById<RemitStatus>("Id", (Int32)_remitStatus.Sent); remit.Sequence = _sequence; _remitDao.Save(remit);--------------------------------------------------------
That´s all..When the 2nd and 3rd lines are being processed, they appear on NHibernate Profiler, but the last line only generates the lines:
select EI_REMIT_ID_SEQ.nextval
from dual
And nothing else...
Thanks for your help!
Rudolf.
--
You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fluent-nhibernate/-/vvbI4y2_v2wJ.
To post to this group, send email to fluent-n...@googlegroups.com.
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/fluent-nhibernate/-/uprs0WrkolIJ.
To post to this group, send email to fluent-n...@googlegroups.com.
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.