[Neo] getProperty and null...

2010-01-05 Thread Mattias Ask
Hi everyone, I have an issue which I would like your opinion on... It's mostly a question of code aesthetics, to be honest, but still... When I look in my code I see myNode.getProperty(SOME_PROP, null); everyehere... The reason for this is that I if I called myNode.getProperty(SOME_PROP) I'd have

Re: [Neo] getProperty and null...

2010-01-05 Thread Mattias Persson
Well, I think it's generally a good thing to be able to distinguish mandatory stuff from optional stuff... and that's the use case of those two methods. If you're getting a property which "must" be there in your domain you shouldn't have to check for null in all those cases, it feels so C-like to

Re: [Neo] getProperty and null...

2010-01-05 Thread Mattias Ask
(First of all, I am sorry if you all got more then one copy of my previous mail... problem with my mail-account...) Thanks for your thought! I agree, but I'm still uncertain of what I think is best... I just get this feeling, you know? It might be that I deep down use the metaphor of a value objec

Re: [Neo] getProperty and null...

2010-01-05 Thread Anders Nawroth
Hi! Mattias Ask: > that isn't set. Or maybe I feel that the default should be that your domain > logic/model should decide if your code should fail miserably, and not the > persistence. I think annotation systems on top of Neo4j, like jo4neo, could be a good place for handling things on this lev

Re: [Neo] getProperty and null...

2010-01-05 Thread rick . bullotta
real "typing" of properties built into Neo at present. Rick Original Message -------- Subject: Re: [Neo] getProperty and null... From: Anders Nawroth Date: Tue, January 05, 2010 5:57 am To: Neo user discussions Hi! Mattias Ask: > that isn

Re: [Neo] getProperty and null...

2010-01-05 Thread rick . bullotta
he need for a traditional "migration" process. Original Message ---- Subject: Re: [Neo] getProperty and null... From: Mattias Persson Date: Tue, January 05, 2010 4:59 am To: Neo user discussions Well, I think it's generally a good thing

Re: [Neo] getProperty and null...

2010-01-05 Thread Peter Neubauer
e since had additional properties added >   to their domain model.  The default value approach helps mitigate the >   need for a traditional "migration" process. > > > >   -------- Original Message >   Subject: Re: [Neo] getProperty and null... >   From:

Re: [Neo] getProperty and null...

2010-01-05 Thread Rick Bullotta
From: Peter Neubauer Date: Tue, 5 Jan 2010 14:13:36 To: Neo user discussions Subject: Re: [Neo] getProperty and null... Hi there, yes, default values are nice, but I think in the case of resilience, this should be handled in a more generic approach outside of the core engine, dealing with the wh

Re: [Neo] getProperty and null...

2010-01-05 Thread Mattias Ask
jo4neo looks veeery interesting. It's passed by my eyes before, but now that I looked a bit closer at it I see that I'll have to try it out :) Thanks! /ma 2010/1/5 Anders Nawroth > Hi! > > Mattias Ask: > > that isn't set. Or maybe I feel that the default should be that your > domain > > logic/m