--To view this discussion on the web visit https://groups.google.com/d/msg/oracle-enhanced/-/Fj94XUOP7lEJ.
You received this message because you are subscribed to the Google Groups "Oracle enhanced adapter for ActiveRecord" group.
To post to this group, send email to oracle-...@googlegroups.com.
To unsubscribe from this group, send email to oracle-enhanc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/oracle-enhanced?hl=en.
I'm guessing the goal here was to express the lack of a PK on the column?
I also have a legacy Oracle db that doesn't universally enforce pk constraints. The best solution I found for this case was to use the composite_primary_keys gem, and then do something like the following:
class Listing < ActiveRecord::Base
set_table_name "xxx.listing"
set_primary_keys :int_con_id
set_sequence_name :autogenerated
end
Using CPK will avoid ActiveRecord disallowing assignment of the PK column, and the use of :autogenerated for the sequence will prevent the adapter from inferring the sequence name. I'm not sure what you were trying to do with `self.table_name`, the class method for setting the table name is set_table_name.
Hope this helps,
Jason