Skip to content

Commit

Permalink
Fix bug with product searching
Browse files Browse the repository at this point in the history
  • Loading branch information
miloradvojnovic committed Mar 17, 2018
1 parent 9aa3999 commit 4644133
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class {{ product.name }}Repository @Inject() (protected val dbConfigProvider: Da

MaybeFilter({{ product.name }}s)
{% for property in product.properties %}
{%- if property.primitive -%}
{% if property.type.name != "Long" and property.type.name != "Int"
and property.type.name != "Double" and property.type.name != "Float" %}
{%- if property.primitive -%}
.filter({{ property.name }})(value => {{ product.name|lower() }} => {{ product.name|lower() }}.{{ property.name }}.toLowerCase like "%"+value.toLowerCase+"%")
{% endif %}
{% if (property.type.name == "Long" or property.type.name == "Int"
Expand Down
13 changes: 8 additions & 5 deletions metamodel/project.scan
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,25 @@ product Processor inherited {
}

product Ram inherited {
ramType: string
maxFrequency: double
capacity: int
voltage: double
latency: int
ramType: RamType
}

category Computer
category ComputerComponent -> Computer
category Processor -> ComputerComponent
category Ram -> ComputerComponent
category Hardware
category Processor -> Hardware
category Ram -> Hardware

enum ProcessorType {
SINGLE, DOUBLE, QUAD, HEXA, OCTA
}

enum RamType {
DDR3, DDR4, DDR5, DDR6
}

enum ProductType {
NEW, ONSALE
}

0 comments on commit 4644133

Please sign in to comment.