Unique constraint not getting respected

Yametazamwa mara 30
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

varun kumar

hayajasomwa,
4 Okt 2015, 01:17:0604/10/2015
kwa Neo4j

I have created a neo4j DB locally and assigned some indices and unique constraint.

Here is the :schema

Indexes
  ON :Actor(social_id) ONLINE (for uniqueness constraint) 
  ON :Category(name)   ONLINE (for uniqueness constraint) 

Constraints
  ON (actor:Actor) ASSERT actor.social_id IS UNIQUE
  ON (category:Category) ASSERT category.name IS UNIQUE

Additionally I do a createIfNotFound() in my java code, where I first do a find and then create if not found.

Inspite of these two checks I still see multiple nodes of Label category and same name existing in the DB.

 MATCH (n:Category) WHERE n.name='garden' RETURN n

name    garden
name    garden
name    garden
name    garden
Returned 4 rows in 49 ms.

I am not sure what I am missing, and why is the unique constraint not being honored.


Would appreciate any pointers to debug.


Thanks

Varun

Mattias Persson

hayajasomwa,
5 Okt 2015, 06:34:1205/10/2015
kwa Neo4j
Hi,

That definitely sounds worrying and unexpected. If you could make available code to reproduce this it would be most helpful.

varun kumar

hayajasomwa,
5 Okt 2015, 15:25:2405/10/2015
kwa ne...@googlegroups.com
Will surely bring up the old checkpoint and do exact steps to repro. Will be back in a day or so.
Thanks a lot for the interest and the response.

Thanks

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Varun KumarĀ 

Jibu wote
Mjibu mchapishaji
Sambaza
Ujumbe 0 mpya