Error "Invalid format: Collection" when doing Upsert
See original GitHub issueI am trying to do an “Collection.Upsert” on the following POCO class. [There are other classes like this where upsert works fine!. Only this class fails]. The error is: Error “Invalid format: Collection” when doing Upsert
public class Order : BindableBase { public Order() { this.OrderItems = new List<string>(); } public int Id { get; set; } [BsonRef(“OrderMaster”)] public OrderMaster OrderMaster { get; set; } public List<string> OrderItems { get; set; } }
Stack trace:
Invalid format: Collection at LiteDB.CollectionService.Add (System.String name) [0x0002b] in <b99fd1821def4ff9a5794b6636ed75ad>:0 at LiteDB.LiteEngine.GetCollectionPage (System.String name, System.Boolean addIfNotExits) [0x00035] in <b99fd1821def4ff9a5794b6636ed75ad>:0 at LiteDB.LiteEngine.Transaction[T] (System.String collection, System.Boolean addIfNotExists, System.Func`2[T,TResult] action) [0x00006] in <b99fd1821def4ff9a5794b6636ed75ad>:0
Thank you for the help…
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (6 by maintainers)
Top GitHub Comments
It would be nice with more explicit error messages than just “Invalid format”. For example “Name too long” and “Invalid character in name” and …
Upgrade do 4.1, it´s fixed now in 60 chars (at limit of 3000 for all collections names)