This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi,
I'm developing modules in DotNetNuke where the PortalID (PK) starts from 0, as opposed to 1. Inserting a record into Search table with PortalId = 0, that references Portals via PortalId (FK) causes a Validation Exception.
The errors are:
The entity in question is: Search
Is there some way to allow the entry of 0-based FK's when required?
Thank you. |
|
|
You would need to set the Portal instead of the PortalId, e.g. record.Portal = unitOfWork.FindById<Portal>(0); Note that if the Portal entity is already in the unit of work, this has minimal extra cost, but if the Portal entity is not already in the unit of work then it will incur the cost of loading it from the database. |
|