Relation on a view in Oracle returns rowid and causes and error

12 views
Skip to first unread message

Andy R

unread,
Jul 9, 2026, 4:17:49 PMJul 9
to Migrated By Firefly
I have a view defined in my Oracle database which is a union of two tables.  In my code I have a model class defined for the view.  When I try to use this class as either the main table or in a relation, the rowid column is automatically added to the SQL statement, but this triggers an Oracle error:

ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.

Since the view uses a union, the rowid column isn't valid.

Is there a way to leave rowid out of the generated SQL statement when using a view?  I could rewrite my code to use dynamic SQL, but I'd rather use the class.

I'm on Firefly version 33073.

Noam Honig

unread,
Jul 10, 2026, 1:53:10 AM (14 days ago) Jul 10
to Andy R, Migrated By Firefly
Row id is only used when you call `UseRowIdAsPrimaryKey` in the constructor.

If you don't call it - we won't use it

Noam Honig  
Founder & CEO


--
You received this message because you are subscribed to the Google Groups "Migrated By Firefly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to migrated-by-fir...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/migrated-by-firefly/39e950dc-3158-4b16-b264-4aa129143c77n%40googlegroups.com.

Andy R

unread,
Jul 13, 2026, 4:36:22 PM (10 days ago) Jul 13
to Migrated By Firefly
Hi Noam.  Thanks for the response.  
Reply all
Reply to author
Forward
0 new messages