Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
removed id from export
Browse files Browse the repository at this point in the history
fixes #198
  • Loading branch information
Alex Honor committed Aug 23, 2012
1 parent ae26023 commit ef58b28
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions grails-app/services/com/dtolabs/ExportService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ class ExportService {
*/
Attribute.findAllByProject(project).each { Attribute attr ->
Map attrMap = attr.toMap()
["name", "id", "filter", "description"].each { key ->
["name", "filter", "description"].each { key ->
BuilderUtil.makeAttribute(attrMap, key)
}
attrMap.remove("id")
root.yana.attributes << attrMap
}
BuilderUtil.makePlural(root.yana, "attributes")
Expand All @@ -60,8 +61,8 @@ class ExportService {
}

Map typeMap = type.toMap()
typeMap.remove("id")
BuilderUtil.makeAttribute(typeMap, "name")
BuilderUtil.makeAttribute(typeMap, "id")

typeMap.remove("parents") // don't include relationship info
typeMap.remove("children")//
Expand Down Expand Up @@ -103,10 +104,11 @@ class ExportService {
}

Map ndMap = nd.toMap()
ndMap.remove("id")
ndMap.remove("parents") // ChildNodes are not included here
ndMap.remove("children")

["name", "id", "type", "tags"].each { key ->
["name", "type", "tags"].each { key ->
BuilderUtil.makeAttribute(ndMap, key)
}
ndMap.remove("typeId") // Don't include the type's ID
Expand Down

0 comments on commit ef58b28

Please sign in to comment.