Open kirillrdy opened 6 years ago
Understood. Problem is here https://github.com/cjheath/activefacts-compositions/blob/master/lib/activefacts/compositions/traits/rails.rb#L155 But in playing with the role names, I have an issue that something seems backwards when the foreign key traverses a LinkFactType. Trying to chase it down now.
example cql
running
schema_compositor --relational --rails/models Warehousing.cql
results in followingthere are two has many transport_requests relationships being generated. could we use roles ( i think they are called roles ) eg transfer_requests_as_origin and transfer_requests_as_destinations it doesnt sound good from english point of view, perhaps this has_many relationship is not useful, but has_many :destinations, :through => :transfer_requests_as_destinations, :source => :destination ( i might have got names wrong ( need cofee )) but basic idea, for a given warehouse, give me all warehouses that I sent stuff to as relationship 1, and give me all warehouses that sent stuff to us as relationship 2.
Hope this makes sense