1

HI Please Help me for RavenDB HTTP Client. I want to store data into Raven-Entity-Name called Log but i am not able to set the metadata in PUT command. How we can set the metadata

$.ajax({
type: "PUT",
url: "http://192.168.0.172:37792/Databases/DMS/docs/Log/"+uuid(),
data: "{ time: '"+(new Date()).toString()+"', description: 'Login', userId: '"+data.Results[0]['@metadata']['@id']+"'}",
success: function(data){console.log(data)},
    crossDomain: true,
    error:function(data){console.log(data)},
    contentType:"application/json"
});
Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
Amit Mourya
  • 538
  • 1
  • 7
  • 18

1 Answers1

0

You can set the metadata with the @metadata property name:

@metadata: { 'Raven-Entity-Name': 'Log' }.

Fitzchak Yitzchaki
  • 9,095
  • 12
  • 56
  • 96