cyberborean / rdfbeans

Java persistence with RDF
Other
11 stars 12 forks source link

Existing context is not considered when calling setter #38

Closed twallmey closed 5 years ago

twallmey commented 5 years ago

Hi, I'm wondering why an update of statements does not consider their existing context. I've got a set of statements that was correctly created within a named graph. When retrieving these statements later on and trying to update them, the existing statements are kept untouched but instead new statements generated whithin the default graph.

I've got the following situation:

dm = obj.getModification() //dm was already created earlier within a special context/named graph
dm.setDate(new Date()); /does not update existing statement - creates new one in default context instead

I would expect the existing statement to be updated in its original context instead of creating a new one within default graph/context

Am I doing something wrong or is this an issue?

Best,

Thorben

cyberborean commented 5 years ago

It looks like create() without context argument returns an object instance found in ANY context, not the default one. I found more issues with multiple contexts that should be taken altogether - I reopened #20 for this task.

cyberborean commented 5 years ago

Can you take a look at changes in the feature-20 branch (see my comment in #20)? The issue should be fixed there.

twallmey commented 5 years ago

It's fixed. Im closing this issue.