TextBlob with CascadeOperations crashes at runtime
Issue #50
closed
public class OperationalPointCollection : IOperationalGeometry
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Name { get; set; }
public IMultiPoint Points { get; set; }
[ManyToOne(CascadeOperations = CascadeOperation.CascadeRead)]
public OperationalPointType PointType { get; set; }
[ForeignKey(typeof(OperationalPointType))]
public int OperationalPointTypeId { get; set; }
[ManyToOne]
public Operation Operation { get; set; }
[ForeignKey(typeof(Operation))]
public int OperationId { get; set; }
[TextBlob("PointIdsBlobbed", CascadeOperations = CascadeOperation.All)]
public List<string> PointIds { get; set; }
public string PointIdsBlobbed { get; set; }
}
At runtime: System.Reflection.CustomAttributeFormatException: Could not find the setter for CascadeOperations
Comments (4)
-
-
It seems that inserting TextBlob elements in the database using recursive operations is working fine, can you check if this test case works for you?
-
- changed status to closed
New tests have shown that Cascade Insert operations are working fine for
TextBlob
properties andCascadeOperations
is not required.TextBlob
will always be read and write when using anyWithChildren
operation. -
reporter Thanks Guillermo. It seems to be working now.
- Log in to comment
TextBlob
attribute doesn't have a setter forCascadeOperation
. It should be a compiler error, not a runtime error. It made no sense navigating to objects inside a TextBlobbed relationship, so cascade operations were disabled by design.