I updated NH from V5.1.3 to the new V5.2 and i have a problem now.
My service throws a MappingException while startup:
MappingException: Unable to build the insert statement for class ...Offer:
a failure occured when adding the property OfferSearch
ArgumentException: The column 'OFFER_ID' has already been added in this SQL
builder
I know that I use the OFFER_ID twice in my entity. I use this mapping:
[Class( Table = "OFFER", ... )]
public class Offer {
[Id(0, TypeType = typeof(long), Column = "OFFER_ID", Name = "Id",
UnsavedValueObject = 0)]
[Generator(1, Class = "sequence")]
[Param(2, Name = "sequence", Content = "SEQ_OFFER")]
public virtual long Id { get; set; }
...
[ManyToOne(Column = "OFFER_ID", ... )]
public virtual OfferSearch OfferSearch { get; set; }
}
In this case my ManyToOne Relation OfferSearch points to a view mapping
that has the same id and contains searchable columns. I only use it in
Query-Statements and read only.
Is there a possibility to tell NH5.2 to behave like NH < 5.2? Can I declare
the ManyToOne relation as ReadOnly? What do I have to do? I have mappings
like this all over my entities...
--
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.