CompositeKeys cannot be the binding expression for relations
Here's what needs to be done :
1) EqualityExpression need to become a trait rather than a class
2) === for composite keys must be made to return EqualityExpression
3) The assign or associate methods of all relation types (OneToMany, ManyToMany) need to behave differently when assigning composite keys, i.e. in the current implementations of assign (ex: _assignKeys) :
https://github.com/max-l/Squeryl/blob/master/src/main/scala/org/squeryl/dsl/QueryDsl.scala#L430
deals only with singe FieldMetaDatas, while compositeKeys are collections of FieldMetaData
(1) and (2) are quite trivial, while (3) is a bit less so, it involves looking at reflection both sides of assign operation and assigning each FieldMetaData on the right side to the corresponding ones on the left side.
1) EqualityExpression need to become a trait rather than a class
2) === for composite keys must be made to return EqualityExpression
3) The assign or associate methods of all relation types (OneToMany, ManyToMany) need to behave differently when assigning composite keys, i.e. in the current implementations of assign (ex: _assignKeys) :
https://github.com/max-l/Squeryl/blob/master/src/main/scala/org/squeryl/dsl/QueryDsl.scala#L430
deals only with singe FieldMetaDatas, while compositeKeys are collections of FieldMetaData
(1) and (2) are quite trivial, while (3) is a bit less so, it involves looking at reflection both sides of assign operation and assigning each FieldMetaData on the right side to the corresponding ones on the left side.
Leave a comment