diff options
Diffstat (limited to 'lib/form.cpp')
-rw-r--r-- | lib/form.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/form.cpp b/lib/form.cpp index 4811f14..fe7d104 100644 --- a/lib/form.cpp +++ b/lib/form.cpp | |||
@@ -16,8 +16,8 @@ namespace verbly { | |||
16 | const field form::complexity = field::integerField(object::form, "complexity"); | 16 | const field form::complexity = field::integerField(object::form, "complexity"); |
17 | const field form::proper = field::booleanField(object::form, "proper"); | 17 | const field form::proper = field::booleanField(object::form, "proper"); |
18 | 18 | ||
19 | const field form::lemma = field::joinField(object::form, "form_id", object::lemma); | 19 | const field form::lemmas = field::joinField(object::form, "form_id", object::lemma); |
20 | const field form::pronunciation = field::joinThrough(object::form, "form_id", object::pronunciation, "forms_pronunciations", "pronunciation_id"); | 20 | const field form::pronunciations = field::joinThrough(object::form, "form_id", object::pronunciation, "forms_pronunciations", "pronunciation_id"); |
21 | 21 | ||
22 | form::form(const database& db, sqlite3_stmt* row) : db_(&db), valid_(true) | 22 | form::form(const database& db, sqlite3_stmt* row) : db_(&db), valid_(true) |
23 | { | 23 | { |
@@ -36,7 +36,7 @@ namespace verbly { | |||
36 | 36 | ||
37 | if (!initializedPronunciations_) | 37 | if (!initializedPronunciations_) |
38 | { | 38 | { |
39 | pronunciations_ = db_->pronunciations(pronunciation::form %= *this, verbly::pronunciation::id, -1).all(); | 39 | pronunciations_ = db_->pronunciations(pronunciation::forms %= *this, pronunciation::id, -1).all(); |
40 | initializedPronunciations_ = true; | 40 | initializedPronunciations_ = true; |
41 | } | 41 | } |
42 | 42 | ||
@@ -50,10 +50,10 @@ namespace verbly { | |||
50 | throw std::domain_error("Bad access to uninitialized form"); | 50 | throw std::domain_error("Bad access to uninitialized form"); |
51 | } | 51 | } |
52 | 52 | ||
53 | const std::vector<verbly::pronunciation>& pronunciations = getPronunciations(); | 53 | const std::vector<pronunciation>& pronunciations = getPronunciations(); |
54 | if (!pronunciations.empty()) | 54 | if (!pronunciations.empty()) |
55 | { | 55 | { |
56 | return std::any_of(std::begin(pronunciations), std::end(pronunciations), [] (const verbly::pronunciation& p) { | 56 | return std::any_of(std::begin(pronunciations), std::end(pronunciations), [] (const pronunciation& p) { |
57 | return p.getPhonemes().front().find_first_of("012") != std::string::npos; | 57 | return p.getPhonemes().front().find_first_of("012") != std::string::npos; |
58 | }); | 58 | }); |
59 | } else { | 59 | } else { |