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

Allow for overriding persisted classes #39

Open
NathanWolf opened this issue Feb 6, 2011 · 2 comments
Open

Allow for overriding persisted classes #39

NathanWolf opened this issue Feb 6, 2011 · 2 comments

Comments

@NathanWolf
Copy link
Owner

When binding to a persisted class, Persistence should check up the class hierarchy for other persisted classes.

From there, they can just be handled like invisible contained objects.

@NathanWolf
Copy link
Owner Author

This is pretty far down on the TODO list now, I think.

Anybody really need to extend their DAOs?

Hm, I guess I could be doing it with NetherPlayer and NetherWorld ... maybe it's not such a bad idea.

@NathanWolf
Copy link
Owner Author

Wow, this:

http://en.wikibooks.org/wiki/Java_Programming/Annotations/Meta-Annotations#Inherited

I stumbled upon while trying to fix an odd issue (I can't use a persisted class from a library?? Why not? It acts like the annotations aren't there.... hrm...)

Anyway, I don't have time to really play with this now, but if I'm reading this right it means I can just add @inherited to PersistField, and it tremendously simplifies supporting persisted ineritence- the fields themselves will just work!

Hell, i need to really think about it, but that might be all I need to even do... since each class would get its own PersistedClass with it's own cache table, and instances get looked up based on actual type- so as long as you don't try to get an instance of a class by using its base class (which should be ok, really, and maybe I could implement that eventually) ... well, it might Just Work.

Man, I really want to try this out now.... giving this issue a serious bump to at least test this out a bit when I get a chance... after I fix this lib issue, or at least bail on Gameplay for the time being so I can post a fixed NetherGate. :\

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

No branches or pull requests

1 participant