Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non serializable types #17

Closed
davidcanadas opened this issue Jul 7, 2010 · 4 comments
Closed

Non serializable types #17

davidcanadas opened this issue Jul 7, 2010 · 4 comments

Comments

@davidcanadas
Copy link

Due to a caching system that I've implemented on top of Norm, I need to serialize Mongo records using system serializers. Unfortunately, I've had to manually modify the ObjectId type (the one I use right now) to add the [Serializable] attribute and allow, then, the record to be serialized.

I think that in-record data types should be serializable by default.

@atheken
Copy link
Owner

atheken commented Jul 7, 2010

I'm not sure what you mean by "in-record data types"? can you include a class definition for one of the classes you're having trouble serializing?

@davidcanadas
Copy link
Author

Sorry about my English... I mean any data type suitable to be in a Mongo collection item, e.g.:

[Serializable]
class Article {
public ObjectId _id { get; set; }
}

Class "Article" is serializable, but "ObjectId" isn't, so I can't serialize without modifying the ObjectId.cs file, that is a bad practice :P

@atheken
Copy link
Owner

atheken commented Aug 4, 2010

If you correct this in a fork, I will be happy to merge this.

@maate
Copy link

maate commented Feb 7, 2011

Hi, I have fixed this in this pull request: #53.
Br. Morten

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants