Search code examples
castle-activerecord

Why there is no hasOne relationship in castle activerecord in contrast to Ruby on Rails?


or how can i represent an address to country mapping where an address has one one country in castle activerecord?


Solution

  • The [BelongsTo] attribute is there for one-to-one relations.

    http://api.castleproject.org/html/T_Castle_ActiveRecord_BelongsToAttribute.htm