mg6maciej
03/24/2017, 7:25 PMtypealias UserId = String
class User(val id: UserId)
val myString: String = "blabla"
User(myString) // wouldn't compile
benleggiero
03/24/2017, 7:26 PMmg6maciej
03/24/2017, 7:27 PMclass UserId(val value: String)
?benleggiero
03/24/2017, 7:27 PMmg6maciej
03/24/2017, 7:28 PMmg6maciej
03/24/2017, 8:08 PMbenleggiero
03/24/2017, 8:33 PMmg6maciej
03/24/2017, 10:48 PMmg6maciej
03/24/2017, 10:51 PMClientId
instead of String
or Long
and if you have it in Purchase
table as FK and Client
table as PK, you will never pass ProductId
(also String
or Long
) to function findClientById(ClientId)
, which you get from Product
.benleggiero
03/25/2017, 3:06 AMtypealias Int64 = Long
typealias Integer = Int64
so I'd now no longer be able to pass a Long
literal to a function that takes an Integer
? Or something like that?sreich
03/29/2017, 2:33 PMsreich
03/29/2017, 2:34 PM