Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,14 @@ interface PostDao {
ft.rootPostUri AS rootPostUri,
ft.generation AS generation,
ft.ancestorCreated AS ancestorCreated,
ft.postCreated AS postCreated
ft.postCreated AS postCreated,
pt.parentPostUri AS parentPostUri
FROM
posts p
JOIN
FullThread ft ON p.uri = ft.uri
LEFT JOIN
postThreads pt ON pt.postUri = p.uri
ORDER BY
ft.ancestorCreated, ft.generation, ft.postCreated; -- sort by the first reply to the op, then the generation, then the post itself
""",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ data class ThreadedPostEntity(
val entity: PostEntity,
val generation: Long,
val rootPostUri: PostUri?,
val parentPostUri: PostUri?,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't update an entity without a migration, the app will crash.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, this is just an Entity in a query, it's not a persisted type.

)

fun PopulatedPostEntity.asExternalModel(
Expand Down