Git Product home page Git Product logo

Comments (4)

lili6561 avatar lili6561 commented on July 23, 2024

Hi,
As I could not reproduce your issue in REST 7.3 or 16.4, I give you below tips:
(1) From your above response, the entries[0] in the 'feed' do HAVE links, but only contain one 'self' link, and in the function RepositoryExec.GetObjectByQualification(), it wants to use the 'edit' link to access the entry, so you could update this method to use the 'self' like, this function should look like this:
public T GetObjectByQualification(string dql, SingleGetOptions options)
{
dql = "select r_object_id from " + dql;
Feed feed = ExecuteDQL(dql, new FeedGetOptions { Inline = false});
if (feed.Entries == null || feed.Entries.Count == 0)
{
return default(T);
}
if (feed.Entries.Count > 1)
{
throw new Exception("The qualification '" + dql + "' has more than one object in repository.");
}
// update the link rel from LinkRelations.EDIT.Rel to LinkRelations.SELF.Rel
return Client.GetSingleton(feed.Entries[0].Links, LinkRelations.SELF.Rel, options);
}
(2) BTW, this function support SingleGetOptions NOT FeedGetOptions.

from documentum-rest-client-dotnet.

xingying18 avatar xingying18 commented on July 23, 2024

Thank you for the reply. It has little to do with "LinkRelations.SELF.Rel" or "LinkRelations.EDIT.Rel", the problem is that "feed.Entries[0].Links" is empty. The following is the feed.ToString() (i reverted back to your original code):

2018-09-17 13:22:41,884 [1] DEBUG Emc.Documentum.Rest.DataModel.Repository - {
"id": "https://:8888/rest/repositories/",
"title": "DQL query results",
"updated": "2018-09-17T13:22:41.616-04:00",
"total": 0,
"items-per-page": 0,
"page": 0,
"author": [
{
"name": "EMC Documentum"
}
],
"entries": [
{
"id": "https://:8888/rest/repositories/?inline=True&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20dm_sysobject%20where%20r_object_id='09031d4580be05cc'&index=0",
"title": "09031d4580be05cc",
"updated": "2018-09-17T13:22:41.616-04:00",
"author": [],
"content": {
"name": "query-result",
"properties": {
"r_object_id": "09031d4580be05cc"
}
},
"score": 0.0
}
],
"links": [
{
"rel": "self",
"href": "https://:8888/rest/repositories/?inline=True&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20dm_sysobject%20where%20r_object_id='09031d4580be05cc'"
}
]
}

from documentum-rest-client-dotnet.

lili6561 avatar lili6561 commented on July 23, 2024

Hi,
Based on your above comment, the feed.Entries[0].Links should be :
"links": [
{
"rel": "self",
"href": "https://:8888/rest/repositories/?inline=True&links=True&page=1&include-total=False&dql=select%20r_object_id%20from%20dm_sysobject%20where%20r_object_id='09031d4580be05cc'"
}
]
.....

from documentum-rest-client-dotnet.

xingying18 avatar xingying18 commented on July 23, 2024

from documentum-rest-client-dotnet.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.