[ https://issues.apache.org/jira/browse/ATLAS-1646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Mestry updated ATLAS-1646: ----------------------------------- Attachment: ATLAS-1646.patch > V1 and V2 GET entity response show different values for date attribute of a > tag which has no value set. > ------------------------------------------------------------------------------------------------------- > > Key: ATLAS-1646 > URL: https://issues.apache.org/jira/browse/ATLAS-1646 > Project: Atlas > Issue Type: Bug > Components: atlas-core > Affects Versions: 0.8-incubating > Reporter: Sharmadha Sainath > Assignee: Ashutosh Mestry > Fix For: 0.8-incubating > > Attachments: ATLAS-1646.patch > > > Created a tag with date as attribute and POSTed to /api/atlas/types. > Associated the tag to an entity with no value for date through REST API. > Association is successful .V1 GET Entity API shows 1970-01-01T00:00:00.000Z > as value for date and V2 GET Entity API shows 0 as value for date. > > V1 API : > {code} > /api/atlas/entities/b10e3c49-af76-4585-893e-c7de6a97ad9b > {code} > {code} > { > requestId: "pool-2-thread-9 - 2c83885c-166b-418c-a7ac-441e1b68d3f2", > definition: { > jsonClass: > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference", > id: { > jsonClass: > "org.apache.atlas.typesystem.json.InstanceSerialization$_Id", > id: "b10e3c49-af76-4585-893e-c7de6a97ad9b", > version: 0, > typeName: "EntityTraitTestClasshqorbbnkkx", > state: "ACTIVE" > }, > typeName: "EntityTraitTestClasshqorbbnkkx", > values: { > name: "EntityTraitTestEntity9psmssjmyp" > }, > traitNames: [ > "addTraitOptionalAttrNotSet9psmssjmyp" > ], > traits: { > addTraitOptionalAttrNotSet9psmssjmyp: { > jsonClass: > "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct", > typeName: > "addTraitOptionalAttrNotSet9psmssjmyp", > values: { > date: "1970-01-01T00:00:00.000Z", > name: "addTraitOptionalAttrName" > } > } > }, > systemAttributes: { > createdBy: "admin", > modifiedBy: "admin", > createdTime: "2017-03-06T13:08:37.666Z", > modifiedTime: "2017-03-06T13:08:37.666Z" > } > } > } > {code} > V2 API response > {code} > /api/atlas/v2/entity/guid/b10e3c49-af76-4585-893e-c7de6a97ad9b > {code} > {code} > { > referredEntities: {}, > entity: { > typeName: "EntityTraitTestClasshqorbbnkkx", > attributes: { > name: "EntityTraitTestEntity9psmssjmyp" > }, > guid: "b10e3c49-af76-4585-893e-c7de6a97ad9b", > status: "ACTIVE", > createdBy: "admin", > updatedBy: "admin", > createTime: 1488805717666, > updateTime: 1488805717666, > version: 0, > classifications: [{ > typeName: "addTraitOptionalAttrNotSet9psmssjmyp", > attributes: { > date: 0, > name: "addTraitOptionalAttrName" > } > }] > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)