Closed adurieux closed 11 years ago
Actually, it's not coercing the Unix timestamp to a Python datetime
object when it should be.
You defined a DateTime
property on your User
model so it should be coercing the Unix timestamp to a Python datetime
object .
See https://github.com/espeed/bulbs/blob/master/bulbs/property.py#L521
After you retrieve it through get
and gremlin
, print type(result)
-- it should return User
, but I suspect it's returning Vertex
because it looks like the User
model's _initialize_element()
method isn't being called.
See
Oh, the reason is you didn't set element_type = "user"
on your User model -- element_type
is required for all Vertex (Node) models and label
is required for Edge (Relationship) models.
Bulbs uses element_type
instead of the Python class name to make it easy to use with different client libraries or languages. You can change the variable name Bulbs uses for element_type
by changing the value of type_var
in Config
:
See https://github.com/espeed/bulbs/blob/master/bulbs/config.py#L56
However, we should be doing a check to ensure that element_type
and label
are set on models.
Hi,
I am facing a strange behaviour when testing the equality of nodes:
Outputs :
As you can see, equality verification fails because of: